diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java index b65992096..85ee1c568 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java @@ -1138,6 +1138,9 @@ public final SearchAllResourcesPagedResponse searchAllResources( * 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 "user" member type. * * * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1164,6 +1167,8 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope * .setQuery("query107944136") * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .addAllAssetTypes(new ArrayList()) + * .setOrderBy("orderBy-1207110587") * .build(); * for (IamPolicySearchResult element : * assetServiceClient.searchAllIamPolicies(request).iterateAll()) { @@ -1196,6 +1201,8 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( * .setQuery("query107944136") * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .addAllAssetTypes(new ArrayList()) + * .setOrderBy("orderBy-1207110587") * .build(); * ApiFuture future = * assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request); @@ -1227,6 +1234,8 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( * .setQuery("query107944136") * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .addAllAssetTypes(new ArrayList()) + * .setOrderBy("orderBy-1207110587") * .build(); * while (true) { * SearchAllIamPoliciesResponse response = diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java index 95b5de2ae..d85b273b9 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java @@ -560,9 +560,7 @@ public static class Builder extends StubSettings.BuildernewArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); definitions.put( "retry_policy_3_codes", ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); @@ -598,10 +596,10 @@ public static class Builder extends StubSettings.Builder.google.c" - + "loud.asset.v1.IamPolicyAnalysisQuery.Res" - + "ourceSelectorB\003\340A\001\022^\n\021identity_selector\030" - + "\003 \001(\0132>.google.cloud.asset.v1.IamPolicyA" - + "nalysisQuery.IdentitySelectorB\003\340A\001\022Z\n\017ac" - + "cess_selector\030\004 \001(\0132<.google.cloud.asset" - + ".v1.IamPolicyAnalysisQuery.AccessSelecto" - + "rB\003\340A\001\022K\n\007options\030\005 \001(\01325.google.cloud.a" - + "sset.v1.IamPolicyAnalysisQuery.OptionsB\003" - + "\340A\001\022^\n\021condition_context\030\006 \001(\0132>.google." - + "cloud.asset.v1.IamPolicyAnalysisQuery.Co" - + "nditionContextB\003\340A\001\0323\n\020ResourceSelector\022" - + "\037\n\022full_resource_name\030\001 \001(\tB\003\340A\002\032)\n\020Iden" - + "titySelector\022\025\n\010identity\030\001 \001(\tB\003\340A\002\032>\n\016A" - + "ccessSelector\022\022\n\005roles\030\001 \003(\tB\003\340A\001\022\030\n\013per" - + "missions\030\002 \003(\tB\003\340A\001\032\330\001\n\007Options\022\032\n\rexpan" - + "d_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\340A\001\022\"\n" - + "\025output_resource_edges\030\004 \001(\010B\003\340A\001\022\037\n\022out" - + "put_group_edges\030\005 \001(\010B\003\340A\001\0222\n%analyze_se" - + "rvice_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\013TimeCon" - + "text\"\240\001\n\027AnalyzeIamPolicyRequest\022J\n\016anal" - + "ysis_query\030\001 \001(\0132-.google.cloud.asset.v1" - + ".IamPolicyAnalysisQueryB\003\340A\002\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\"\302\001\n\"AnalyzeIamPolicy" - + "LongrunningRequest\022J\n\016analysis_query\030\001 \001" - + "(\0132-.google.cloud.asset.v1.IamPolicyAnal" - + "ysisQueryB\003\340A\002\022P\n\routput_config\030\002 \001(\01324." - + "google.cloud.asset.v1.IamPolicyAnalysisO" - + "utputConfigB\003\340A\002\"%\n#AnalyzeIamPolicyLong" - + "runningResponse*~\n\013ContentType\022\034\n\030CONTEN" - + "T_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIA" - + "M_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POL" - + "ICY\020\005\022\020\n\014OS_INVENTORY\020\0062\347\020\n\014AssetService" - + "\022\336\001\n\014ExportAssets\022*.google.cloud.asset.v" - + "1.ExportAssetsRequest\032\035.google.longrunni" - + "ng.Operation\"\202\001\202\323\344\223\002\"\"\035/v1/{parent=*/*}:" - + "exportAssets:\001*\312AW\n*google.cloud.asset.v" - + "1.ExportAssetsResponse\022)google.cloud.ass" - + "et.v1.ExportAssetsRequest\022\213\001\n\nListAssets" - + "\022(.google.cloud.asset.v1.ListAssetsReque" - + "st\032).google.cloud.asset.v1.ListAssetsRes" - + "ponse\"(\202\323\344\223\002\031\022\027/v1/{parent=*/*}/assets\332A" - + "\006parent\022\262\001\n\025BatchGetAssetsHistory\0223.goog" - + "le.cloud.asset.v1.BatchGetAssetsHistoryR" - + "equest\0324.google.cloud.asset.v1.BatchGetA" - + "ssetsHistoryResponse\".\202\323\344\223\002(\022&/v1/{paren" - + "t=*/*}:batchGetAssetsHistory\022\177\n\nCreateFe" - + "ed\022(.google.cloud.asset.v1.CreateFeedReq" - + "uest\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.asset.v1.GetFeed" - + "Request\032\033.google.cloud.asset.v1.Feed\"%\202\323" - + "\344\223\002\030\022\026/v1/{name=*/*/feeds/*}\332A\004name\022\207\001\n\t" - + "ListFeeds\022\'.google.cloud.asset.v1.ListFe" - + "edsRequest\032(.google.cloud.asset.v1.ListF" - + "eedsResponse\"\'\202\323\344\223\002\030\022\026/v1/{parent=*/*}/f" - + "eeds\332A\006parent\022\202\001\n\nUpdateFeed\022(.google.cl" - + "oud.asset.v1.UpdateFeedRequest\032\033.google." - + "cloud.asset.v1.Feed\"-\202\323\344\223\002 2\033/v1/{feed.n" - + "ame=*/*/feeds/*}:\001*\332A\004feed\022u\n\nDeleteFeed" - + "\022(.google.cloud.asset.v1.DeleteFeedReque" - + "st\032\026.google.protobuf.Empty\"%\202\323\344\223\002\030*\026/v1/" - + "{name=*/*/feeds/*}\332A\004name\022\277\001\n\022SearchAllR" - + "esources\0220.google.cloud.asset.v1.SearchA" - + "llResourcesRequest\0321.google.cloud.asset." - + "v1.SearchAllResourcesResponse\"D\202\323\344\223\002$\022\"/" - + "v1/{scope=*/*}:searchAllResources\332A\027scop" - + "e,query,asset_types\022\273\001\n\024SearchAllIamPoli" - + "cies\0222.google.cloud.asset.v1.SearchAllIa" - + "mPoliciesRequest\0323.google.cloud.asset.v1" - + ".SearchAllIamPoliciesResponse\":\202\323\344\223\002&\022$/" - + "v1/{scope=*/*}:searchAllIamPolicies\332A\013sc" - + "ope,query\022\254\001\n\020AnalyzeIamPolicy\022..google." - + "cloud.asset.v1.AnalyzeIamPolicyRequest\032/" - + ".google.cloud.asset.v1.AnalyzeIamPolicyR" - + "esponse\"7\202\323\344\223\0021\022//v1/{analysis_query.sco" - + "pe=*/*}:analyzeIamPolicy\022\267\002\n\033AnalyzeIamP" - + "olicyLongrunning\0229.google.cloud.asset.v1" - + ".AnalyzeIamPolicyLongrunningRequest\032\035.go" - + "ogle.longrunning.Operation\"\275\001\202\323\344\223\002?\":/v1" - + "/{analysis_query.scope=*/*}:analyzeIamPo" - + "licyLongrunning:\001*\312Au\n9google.cloud.asse" - + "t.v1.AnalyzeIamPolicyLongrunningResponse" - + "\0228google.cloud.asset.v1.AnalyzeIamPolicy" - + "LongrunningRequest\032M\312A\031cloudasset.google" - + "apis.com\322A.https://www.googleapis.com/au" - + "th/cloud-platformB\234\001\n\031com.google.cloud.a" - + "sset.v1B\021AssetServiceProtoP\001Z:google.gol" - + "ang.org/genproto/googleapis/cloud/asset/" - + "v1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Googl" - + "e\\Cloud\\Asset\\V1b\006proto3" + + "archResult\022\027\n\017next_page_token\030\002 \001(\t\"\247\001\n\033" + + "SearchAllIamPoliciesRequest\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\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\022\030\n\013" + + "asset_types\030\005 \003(\tB\003\340A\001\022\025\n\010order_by\030\007 \001(\t" + + "B\003\340A\001\"v\n\034SearchAllIamPoliciesResponse\022=\n" + + "\007results\030\001 \003(\0132,.google.cloud.asset.v1.I" + + "amPolicySearchResult\022\027\n\017next_page_token\030" + + "\002 \001(\t\"\306\007\n\026IamPolicyAnalysisQuery\022\022\n\005scop" + + "e\030\001 \001(\tB\003\340A\002\022^\n\021resource_selector\030\002 \001(\0132" + + ">.google.cloud.asset.v1.IamPolicyAnalysi" + + "sQuery.ResourceSelectorB\003\340A\001\022^\n\021identity" + + "_selector\030\003 \001(\0132>.google.cloud.asset.v1." + + "IamPolicyAnalysisQuery.IdentitySelectorB" + + "\003\340A\001\022Z\n\017access_selector\030\004 \001(\0132<.google.c" + + "loud.asset.v1.IamPolicyAnalysisQuery.Acc" + + "essSelectorB\003\340A\001\022K\n\007options\030\005 \001(\01325.goog" + + "le.cloud.asset.v1.IamPolicyAnalysisQuery" + + ".OptionsB\003\340A\001\022^\n\021condition_context\030\006 \001(\013" + + "2>.google.cloud.asset.v1.IamPolicyAnalys" + + "isQuery.ConditionContextB\003\340A\001\0323\n\020Resourc" + + "eSelector\022\037\n\022full_resource_name\030\001 \001(\tB\003\340" + + "A\002\032)\n\020IdentitySelector\022\025\n\010identity\030\001 \001(\t" + + "B\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\007Option" + + "s\022\032\n\rexpand_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\340A\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%" + + "analyze_service_account_impersonation\030\006 " + + "\001(\010B\003\340A\001\032T\n\020ConditionContext\0221\n\013access_t" + + "ime\030\001 \001(\0132\032.google.protobuf.TimestampH\000B" + + "\r\n\013TimeContext\"\240\001\n\027AnalyzeIamPolicyReque" + + "st\022J\n\016analysis_query\030\001 \001(\0132-.google.clou" + + "d.asset.v1.IamPolicyAnalysisQueryB\003\340A\002\0229" + + "\n\021execution_timeout\030\002 \001(\0132\031.google.proto" + + "buf.DurationB\003\340A\001\"\212\004\n\030AnalyzeIamPolicyRe" + + "sponse\022X\n\rmain_analysis\030\001 \001(\0132A.google.c" + + "loud.asset.v1.AnalyzeIamPolicyResponse.I" + + "amPolicyAnalysis\022q\n&service_account_impe" + + "rsonation_analysis\030\002 \003(\0132A.google.cloud." + + "asset.v1.AnalyzeIamPolicyResponse.IamPol" + + "icyAnalysis\022\026\n\016fully_explored\030\003 \001(\010\032\210\002\n\021" + + "IamPolicyAnalysis\022E\n\016analysis_query\030\001 \001(" + + "\0132-.google.cloud.asset.v1.IamPolicyAnaly" + + "sisQuery\022H\n\020analysis_results\030\002 \003(\0132..goo" + + "gle.cloud.asset.v1.IamPolicyAnalysisResu" + + "lt\022\026\n\016fully_explored\030\003 \001(\010\022J\n\023non_critic" + + "al_errors\030\005 \003(\0132-.google.cloud.asset.v1." + + "IamPolicyAnalysisState\"\264\004\n\035IamPolicyAnal" + + "ysisOutputConfig\022^\n\017gcs_destination\030\001 \001(" + + "\0132C.google.cloud.asset.v1.IamPolicyAnaly" + + "sisOutputConfig.GcsDestinationH\000\022h\n\024bigq" + + "uery_destination\030\002 \001(\0132H.google.cloud.as" + + "set.v1.IamPolicyAnalysisOutputConfig.Big" + + "QueryDestinationH\000\032\"\n\016GcsDestination\022\020\n\003" + + "uri\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.asset.v1.IamPolicyAnalysisOutputCo" + + "nfig.BigQueryDestination.PartitionKey\022\036\n" + + "\021write_disposition\030\004 \001(\tB\003\340A\001\"?\n\014Partiti" + + "onKey\022\035\n\031PARTITION_KEY_UNSPECIFIED\020\000\022\020\n\014" + + "REQUEST_TIME\020\001B\r\n\013destination\"\302\001\n\"Analyz" + + "eIamPolicyLongrunningRequest\022J\n\016analysis" + + "_query\030\001 \001(\0132-.google.cloud.asset.v1.Iam" + + "PolicyAnalysisQueryB\003\340A\002\022P\n\routput_confi" + + "g\030\002 \001(\01324.google.cloud.asset.v1.IamPolic" + + "yAnalysisOutputConfigB\003\340A\002\"%\n#AnalyzeIam" + + "PolicyLongrunningResponse*~\n\013ContentType" + + "\022\034\n\030CONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOUR" + + "CE\020\001\022\016\n\nIAM_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\r" + + "ACCESS_POLICY\020\005\022\020\n\014OS_INVENTORY\020\0062\347\020\n\014As" + + "setService\022\336\001\n\014ExportAssets\022*.google.clo" + + "ud.asset.v1.ExportAssetsRequest\032\035.google" + + ".longrunning.Operation\"\202\001\202\323\344\223\002\"\"\035/v1/{pa" + + "rent=*/*}:exportAssets:\001*\312AW\n*google.clo" + + "ud.asset.v1.ExportAssetsResponse\022)google" + + ".cloud.asset.v1.ExportAssetsRequest\022\213\001\n\n" + + "ListAssets\022(.google.cloud.asset.v1.ListA" + + "ssetsRequest\032).google.cloud.asset.v1.Lis" + + "tAssetsResponse\"(\202\323\344\223\002\031\022\027/v1/{parent=*/*" + + "}/assets\332A\006parent\022\262\001\n\025BatchGetAssetsHist" + + "ory\0223.google.cloud.asset.v1.BatchGetAsse" + + "tsHistoryRequest\0324.google.cloud.asset.v1" + + ".BatchGetAssetsHistoryResponse\".\202\323\344\223\002(\022&" + + "/v1/{parent=*/*}:batchGetAssetsHistory\022\177" + + "\n\nCreateFeed\022(.google.cloud.asset.v1.Cre" + + "ateFeedRequest\032\033.google.cloud.asset.v1.F" + + "eed\"*\202\323\344\223\002\033\"\026/v1/{parent=*/*}/feeds:\001*\332A" + + "\006parent\022t\n\007GetFeed\022%.google.cloud.asset." + + "v1.GetFeedRequest\032\033.google.cloud.asset.v" + + "1.Feed\"%\202\323\344\223\002\030\022\026/v1/{name=*/*/feeds/*}\332A" + + "\004name\022\207\001\n\tListFeeds\022\'.google.cloud.asset" + + ".v1.ListFeedsRequest\032(.google.cloud.asse" + + "t.v1.ListFeedsResponse\"\'\202\323\344\223\002\030\022\026/v1/{par" + + "ent=*/*}/feeds\332A\006parent\022\202\001\n\nUpdateFeed\022(" + + ".google.cloud.asset.v1.UpdateFeedRequest" + + "\032\033.google.cloud.asset.v1.Feed\"-\202\323\344\223\002 2\033/" + + "v1/{feed.name=*/*/feeds/*}:\001*\332A\004feed\022u\n\n" + + "DeleteFeed\022(.google.cloud.asset.v1.Delet" + + "eFeedRequest\032\026.google.protobuf.Empty\"%\202\323" + + "\344\223\002\030*\026/v1/{name=*/*/feeds/*}\332A\004name\022\277\001\n\022" + + "SearchAllResources\0220.google.cloud.asset." + + "v1.SearchAllResourcesRequest\0321.google.cl" + + "oud.asset.v1.SearchAllResourcesResponse\"" + + "D\202\323\344\223\002$\022\"/v1/{scope=*/*}:searchAllResour" + + "ces\332A\027scope,query,asset_types\022\273\001\n\024Search" + + "AllIamPolicies\0222.google.cloud.asset.v1.S" + + "earchAllIamPoliciesRequest\0323.google.clou" + + "d.asset.v1.SearchAllIamPoliciesResponse\"" + + ":\202\323\344\223\002&\022$/v1/{scope=*/*}:searchAllIamPol" + + "icies\332A\013scope,query\022\254\001\n\020AnalyzeIamPolicy" + + "\022..google.cloud.asset.v1.AnalyzeIamPolic" + + "yRequest\032/.google.cloud.asset.v1.Analyze" + + "IamPolicyResponse\"7\202\323\344\223\0021\022//v1/{analysis" + + "_query.scope=*/*}:analyzeIamPolicy\022\267\002\n\033A" + + "nalyzeIamPolicyLongrunning\0229.google.clou" + + "d.asset.v1.AnalyzeIamPolicyLongrunningRe" + + "quest\032\035.google.longrunning.Operation\"\275\001\202" + + "\323\344\223\002?\":/v1/{analysis_query.scope=*/*}:an" + + "alyzeIamPolicyLongrunning:\001*\312Au\n9google." + + "cloud.asset.v1.AnalyzeIamPolicyLongrunni" + + "ngResponse\0228google.cloud.asset.v1.Analyz" + + "eIamPolicyLongrunningRequest\032M\312A\031cloudas" + + "set.googleapis.com\322A.https://www.googlea" + + "pis.com/auth/cloud-platformB\234\001\n\031com.goog" + + "le.cloud.asset.v1B\021AssetServiceProtoP\001Z:" + + "google.golang.org/genproto/googleapis/cl" + + "oud/asset/v1;asset\252\002\025Google.Cloud.Asset." + + "V1\312\002\025Google\\Cloud\\Asset\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -620,7 +621,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor, new java.lang.String[] { - "Scope", "Query", "PageSize", "PageToken", + "Scope", "Query", "PageSize", "PageToken", "AssetTypes", "OrderBy", }); internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor = getDescriptor().getMessageTypes().get(24); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java index 7d717b2ac..eab1c63b0 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java @@ -39,7 +39,10 @@ private IamPolicySearchResult(com.google.protobuf.GeneratedMessageV3.Builder private IamPolicySearchResult() { resource_ = ""; + assetType_ = ""; project_ = ""; + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + organization_ = ""; } @java.lang.Override @@ -61,6 +64,7 @@ private IamPolicySearchResult( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -114,6 +118,30 @@ private IamPolicySearchResult( 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: @@ -130,6 +158,9 @@ private IamPolicySearchResult( } 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(); } @@ -2070,6 +2101,61 @@ public com.google.protobuf.ByteString getResourceBytes() { } } + 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_; /** @@ -2131,6 +2217,152 @@ public com.google.protobuf.ByteString getProjectBytes() { } } + 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_; /** @@ -2288,6 +2520,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (explanation_ != null) { output.writeMessage(4, getExplanation()); } + if (!getAssetTypeBytes().isEmpty()) { + 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 (!getOrganizationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, organization_); + } unknownFields.writeTo(output); } @@ -2309,6 +2550,20 @@ public int getSerializedSize() { if (explanation_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExplanation()); } + if (!getAssetTypeBytes().isEmpty()) { + 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 (!getOrganizationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, organization_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2326,7 +2581,10 @@ public boolean equals(final java.lang.Object obj) { (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; @@ -2348,8 +2606,16 @@ public int hashCode() { 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(); @@ -2505,8 +2771,14 @@ public Builder clear() { super.clear(); resource_ = ""; + assetType_ = ""; + project_ = ""; + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + organization_ = ""; + if (policyBuilder_ == null) { policy_ = null; } else { @@ -2546,8 +2818,16 @@ public com.google.cloud.asset.v1.IamPolicySearchResult build() { 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 { @@ -2612,10 +2892,28 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult other) 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()); } @@ -2651,6 +2949,8 @@ public Builder mergeFrom( return this; } + private int bitField0_; + private java.lang.Object resource_ = ""; /** * @@ -2792,6 +3092,127 @@ public Builder setResourceBytes(com.google.protobuf.ByteString value) { 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_ = ""; /** * @@ -2928,6 +3349,364 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { 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, diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java index 8c5e8cefb..a79c38011 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java @@ -62,6 +62,37 @@ public interface IamPolicySearchResultOrBuilder */ 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(); + /** * * @@ -99,6 +130,118 @@ public interface IamPolicySearchResultOrBuilder */ 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(); + /** * * diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java index 9ab7c271b..95f6d1c77 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java @@ -41,6 +41,8 @@ private SearchAllIamPoliciesRequest() { scope_ = ""; query_ = ""; pageToken_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + orderBy_ = ""; } @java.lang.Override @@ -62,6 +64,7 @@ private SearchAllIamPoliciesRequest( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -98,6 +101,23 @@ private SearchAllIamPoliciesRequest( 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)) { @@ -112,6 +132,9 @@ private SearchAllIamPoliciesRequest( } 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(); } @@ -241,6 +264,10 @@ public com.google.protobuf.ByteString getScopeBytes() { * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -299,6 +326,10 @@ public java.lang.String getQuery() { * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -394,6 +425,182 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + 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 @@ -420,6 +627,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getPageTokenBytes().isEmpty()) { 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 (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, orderBy_); + } unknownFields.writeTo(output); } @@ -441,6 +654,17 @@ public int getSerializedSize() { if (!getPageTokenBytes().isEmpty()) { 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 (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, orderBy_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -461,6 +685,8 @@ public boolean equals(final java.lang.Object obj) { 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; } @@ -480,6 +706,12 @@ public int hashCode() { 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; @@ -634,6 +866,10 @@ public Builder clear() { pageToken_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + orderBy_ = ""; + return this; } @@ -661,10 +897,17 @@ public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest build() { 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; } @@ -730,6 +973,20 @@ public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllIamPoliciesRequest o 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; @@ -760,6 +1017,8 @@ public Builder mergeFrom( return this; } + private int bitField0_; + private java.lang.Object scope_ = ""; /** * @@ -952,6 +1211,10 @@ public Builder setScopeBytes(com.google.protobuf.ByteString value) { * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1009,6 +1272,10 @@ public java.lang.String getQuery() { * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1066,6 +1333,10 @@ public com.google.protobuf.ByteString getQueryBytes() { * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1122,6 +1393,10 @@ public Builder setQuery(java.lang.String value) { * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1174,6 +1449,10 @@ public Builder clearQuery() { * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1374,6 +1653,433 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java index dfb8af0ad..b09fa81dd 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java @@ -106,6 +106,10 @@ public interface SearchAllIamPoliciesRequestOrBuilder * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -153,6 +157,10 @@ public interface SearchAllIamPoliciesRequestOrBuilder * * `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 "user" + * member type. * * * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -207,4 +215,146 @@ public interface SearchAllIamPoliciesRequestOrBuilder * @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/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto index eadaef285..59f517bb0 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto @@ -838,6 +838,10 @@ message SearchAllIamPoliciesRequest { // * `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 "user" + // member type. string query = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The page size for search result pagination. Page size is capped at 500 even @@ -851,6 +855,36 @@ message SearchAllIamPoliciesRequest { // 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. diff --git a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto index 572ed739a..a607784e8 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto @@ -463,6 +463,14 @@ message IamPolicySearchResult { // * 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 @@ -474,6 +482,28 @@ message IamPolicySearchResult { // * 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