Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 0ddf192

Browse files
feat: Add SavedQuery CURD support (#1211)
- [ ] Regenerate this pull request now. feat: Add tags support feat!:*Add RelatedAsset and deprecate RelatedAssets for relationship GA *The previous representation of the relationship feature is deprecated and unimplemented. The RelatedAsset message represents the new stable format. PiperOrigin-RevId: 449306805 Source-Link: googleapis/googleapis@3d7bd9d Source-Link: https://github.com/googleapis/googleapis-gen/commit/71a93d05d6076271d04b7592f7fad0d3f0c7a040 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzFhOTNkMDVkNjA3NjI3MWQwNGI3NTkyZjdmYWQwZDNmMGM3YTA0MCJ9
1 parent efccf59 commit 0ddf192

File tree

76 files changed

+25438
-2142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+25438
-2142
lines changed

google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java

Lines changed: 900 additions & 16 deletions
Large diffs are not rendered by default.

google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.asset.v1;
1818

1919
import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse;
20+
import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse;
2021
import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse;
2122
import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse;
2223

@@ -166,6 +167,40 @@ public UnaryCallSettings<AnalyzeMoveRequest, AnalyzeMoveResponse> analyzeMoveSet
166167
return ((AssetServiceStubSettings) getStubSettings()).analyzeMoveSettings();
167168
}
168169

170+
/** Returns the object with the settings used for calls to createSavedQuery. */
171+
public UnaryCallSettings<CreateSavedQueryRequest, SavedQuery> createSavedQuerySettings() {
172+
return ((AssetServiceStubSettings) getStubSettings()).createSavedQuerySettings();
173+
}
174+
175+
/** Returns the object with the settings used for calls to getSavedQuery. */
176+
public UnaryCallSettings<GetSavedQueryRequest, SavedQuery> getSavedQuerySettings() {
177+
return ((AssetServiceStubSettings) getStubSettings()).getSavedQuerySettings();
178+
}
179+
180+
/** Returns the object with the settings used for calls to listSavedQueries. */
181+
public PagedCallSettings<
182+
ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse>
183+
listSavedQueriesSettings() {
184+
return ((AssetServiceStubSettings) getStubSettings()).listSavedQueriesSettings();
185+
}
186+
187+
/** Returns the object with the settings used for calls to updateSavedQuery. */
188+
public UnaryCallSettings<UpdateSavedQueryRequest, SavedQuery> updateSavedQuerySettings() {
189+
return ((AssetServiceStubSettings) getStubSettings()).updateSavedQuerySettings();
190+
}
191+
192+
/** Returns the object with the settings used for calls to deleteSavedQuery. */
193+
public UnaryCallSettings<DeleteSavedQueryRequest, Empty> deleteSavedQuerySettings() {
194+
return ((AssetServiceStubSettings) getStubSettings()).deleteSavedQuerySettings();
195+
}
196+
197+
/** Returns the object with the settings used for calls to batchGetEffectiveIamPolicies. */
198+
public UnaryCallSettings<
199+
BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse>
200+
batchGetEffectiveIamPoliciesSettings() {
201+
return ((AssetServiceStubSettings) getStubSettings()).batchGetEffectiveIamPoliciesSettings();
202+
}
203+
169204
public static final AssetServiceSettings create(AssetServiceStubSettings stub)
170205
throws IOException {
171206
return new AssetServiceSettings.Builder(stub.toBuilder()).build();
@@ -355,6 +390,42 @@ public UnaryCallSettings.Builder<DeleteFeedRequest, Empty> deleteFeedSettings()
355390
return getStubSettingsBuilder().analyzeMoveSettings();
356391
}
357392

393+
/** Returns the builder for the settings used for calls to createSavedQuery. */
394+
public UnaryCallSettings.Builder<CreateSavedQueryRequest, SavedQuery>
395+
createSavedQuerySettings() {
396+
return getStubSettingsBuilder().createSavedQuerySettings();
397+
}
398+
399+
/** Returns the builder for the settings used for calls to getSavedQuery. */
400+
public UnaryCallSettings.Builder<GetSavedQueryRequest, SavedQuery> getSavedQuerySettings() {
401+
return getStubSettingsBuilder().getSavedQuerySettings();
402+
}
403+
404+
/** Returns the builder for the settings used for calls to listSavedQueries. */
405+
public PagedCallSettings.Builder<
406+
ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse>
407+
listSavedQueriesSettings() {
408+
return getStubSettingsBuilder().listSavedQueriesSettings();
409+
}
410+
411+
/** Returns the builder for the settings used for calls to updateSavedQuery. */
412+
public UnaryCallSettings.Builder<UpdateSavedQueryRequest, SavedQuery>
413+
updateSavedQuerySettings() {
414+
return getStubSettingsBuilder().updateSavedQuerySettings();
415+
}
416+
417+
/** Returns the builder for the settings used for calls to deleteSavedQuery. */
418+
public UnaryCallSettings.Builder<DeleteSavedQueryRequest, Empty> deleteSavedQuerySettings() {
419+
return getStubSettingsBuilder().deleteSavedQuerySettings();
420+
}
421+
422+
/** Returns the builder for the settings used for calls to batchGetEffectiveIamPolicies. */
423+
public UnaryCallSettings.Builder<
424+
BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse>
425+
batchGetEffectiveIamPoliciesSettings() {
426+
return getStubSettingsBuilder().batchGetEffectiveIamPoliciesSettings();
427+
}
428+
358429
@Override
359430
public AssetServiceSettings build() throws IOException {
360431
return new AssetServiceSettings(this);

google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,39 @@
2222
"BatchGetAssetsHistory": {
2323
"methods": ["batchGetAssetsHistory", "batchGetAssetsHistoryCallable"]
2424
},
25+
"BatchGetEffectiveIamPolicies": {
26+
"methods": ["batchGetEffectiveIamPolicies", "batchGetEffectiveIamPoliciesCallable"]
27+
},
2528
"CreateFeed": {
2629
"methods": ["createFeed", "createFeed", "createFeedCallable"]
2730
},
31+
"CreateSavedQuery": {
32+
"methods": ["createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQueryCallable"]
33+
},
2834
"DeleteFeed": {
2935
"methods": ["deleteFeed", "deleteFeed", "deleteFeed", "deleteFeedCallable"]
3036
},
37+
"DeleteSavedQuery": {
38+
"methods": ["deleteSavedQuery", "deleteSavedQuery", "deleteSavedQuery", "deleteSavedQueryCallable"]
39+
},
3140
"ExportAssets": {
3241
"methods": ["exportAssetsAsync", "exportAssetsOperationCallable", "exportAssetsCallable"]
3342
},
3443
"GetFeed": {
3544
"methods": ["getFeed", "getFeed", "getFeed", "getFeedCallable"]
3645
},
46+
"GetSavedQuery": {
47+
"methods": ["getSavedQuery", "getSavedQuery", "getSavedQuery", "getSavedQueryCallable"]
48+
},
3749
"ListAssets": {
3850
"methods": ["listAssets", "listAssets", "listAssets", "listAssetsPagedCallable", "listAssetsCallable"]
3951
},
4052
"ListFeeds": {
4153
"methods": ["listFeeds", "listFeeds", "listFeedsCallable"]
4254
},
55+
"ListSavedQueries": {
56+
"methods": ["listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueriesPagedCallable", "listSavedQueriesCallable"]
57+
},
4358
"SearchAllIamPolicies": {
4459
"methods": ["searchAllIamPolicies", "searchAllIamPolicies", "searchAllIamPoliciesPagedCallable", "searchAllIamPoliciesCallable"]
4560
},
@@ -48,6 +63,9 @@
4863
},
4964
"UpdateFeed": {
5065
"methods": ["updateFeed", "updateFeed", "updateFeedCallable"]
66+
},
67+
"UpdateSavedQuery": {
68+
"methods": ["updateSavedQuery", "updateSavedQuery", "updateSavedQueryCallable"]
5169
}
5270
}
5371
}

google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.asset.v1.stub;
1818

1919
import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse;
20+
import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse;
2021
import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse;
2122
import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse;
2223

@@ -32,21 +33,30 @@
3233
import com.google.cloud.asset.v1.AnalyzeMoveResponse;
3334
import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest;
3435
import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse;
36+
import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest;
37+
import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse;
3538
import com.google.cloud.asset.v1.CreateFeedRequest;
39+
import com.google.cloud.asset.v1.CreateSavedQueryRequest;
3640
import com.google.cloud.asset.v1.DeleteFeedRequest;
41+
import com.google.cloud.asset.v1.DeleteSavedQueryRequest;
3742
import com.google.cloud.asset.v1.ExportAssetsRequest;
3843
import com.google.cloud.asset.v1.ExportAssetsResponse;
3944
import com.google.cloud.asset.v1.Feed;
4045
import com.google.cloud.asset.v1.GetFeedRequest;
46+
import com.google.cloud.asset.v1.GetSavedQueryRequest;
4147
import com.google.cloud.asset.v1.ListAssetsRequest;
4248
import com.google.cloud.asset.v1.ListAssetsResponse;
4349
import com.google.cloud.asset.v1.ListFeedsRequest;
4450
import com.google.cloud.asset.v1.ListFeedsResponse;
51+
import com.google.cloud.asset.v1.ListSavedQueriesRequest;
52+
import com.google.cloud.asset.v1.ListSavedQueriesResponse;
53+
import com.google.cloud.asset.v1.SavedQuery;
4554
import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest;
4655
import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse;
4756
import com.google.cloud.asset.v1.SearchAllResourcesRequest;
4857
import com.google.cloud.asset.v1.SearchAllResourcesResponse;
4958
import com.google.cloud.asset.v1.UpdateFeedRequest;
59+
import com.google.cloud.asset.v1.UpdateSavedQueryRequest;
5060
import com.google.longrunning.Operation;
5161
import com.google.longrunning.stub.OperationsStub;
5262
import com.google.protobuf.Empty;
@@ -151,6 +161,38 @@ public UnaryCallable<AnalyzeMoveRequest, AnalyzeMoveResponse> analyzeMoveCallabl
151161
throw new UnsupportedOperationException("Not implemented: analyzeMoveCallable()");
152162
}
153163

164+
public UnaryCallable<CreateSavedQueryRequest, SavedQuery> createSavedQueryCallable() {
165+
throw new UnsupportedOperationException("Not implemented: createSavedQueryCallable()");
166+
}
167+
168+
public UnaryCallable<GetSavedQueryRequest, SavedQuery> getSavedQueryCallable() {
169+
throw new UnsupportedOperationException("Not implemented: getSavedQueryCallable()");
170+
}
171+
172+
public UnaryCallable<ListSavedQueriesRequest, ListSavedQueriesPagedResponse>
173+
listSavedQueriesPagedCallable() {
174+
throw new UnsupportedOperationException("Not implemented: listSavedQueriesPagedCallable()");
175+
}
176+
177+
public UnaryCallable<ListSavedQueriesRequest, ListSavedQueriesResponse>
178+
listSavedQueriesCallable() {
179+
throw new UnsupportedOperationException("Not implemented: listSavedQueriesCallable()");
180+
}
181+
182+
public UnaryCallable<UpdateSavedQueryRequest, SavedQuery> updateSavedQueryCallable() {
183+
throw new UnsupportedOperationException("Not implemented: updateSavedQueryCallable()");
184+
}
185+
186+
public UnaryCallable<DeleteSavedQueryRequest, Empty> deleteSavedQueryCallable() {
187+
throw new UnsupportedOperationException("Not implemented: deleteSavedQueryCallable()");
188+
}
189+
190+
public UnaryCallable<BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse>
191+
batchGetEffectiveIamPoliciesCallable() {
192+
throw new UnsupportedOperationException(
193+
"Not implemented: batchGetEffectiveIamPoliciesCallable()");
194+
}
195+
154196
@Override
155197
public abstract void close();
156198
}

0 commit comments

Comments
 (0)