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

Commit 9f27e23

Browse files
feat(v1beta1)!: regenerate with Gapic V2 pagination settings (#196)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/129bf4ce-2255-4b88-83a1-1b40d560e3d3/targets Source-Link: googleapis/synthtool@8b65daa PiperOrigin-RevId: 313460921 Source-Link: googleapis/googleapis@c4e3701 PiperOrigin-RevId: 310415142 Source-Link: googleapis/googleapis@684dfea PiperOrigin-RevId: 309824146 Source-Link: googleapis/googleapis@e0f9d9e BREAKING CHANGE: return types for list methods now return paginated responses
1 parent a666443 commit 9f27e23

File tree

154 files changed

+6465
-2532
lines changed

Some content is hidden

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

154 files changed

+6465
-2532
lines changed

.github/CODEOWNERS

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Code owners file.
2+
# This file controls who is tagged for review for any given pull request.
3+
4+
# For syntax help see:
5+
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
6+
7+
# The java-samples-reviewers team is the default owner for samples changes
8+
samples/**/*.java @googleapis/java-samples-reviewers

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>5.3.0</version>
23+
<version>5.5.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
3+
<differences>
4+
<difference>
5+
<differenceType>7002</differenceType>
6+
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
7+
<method>java.lang.String format*(*)</method>
8+
</difference>
9+
<difference>
10+
<differenceType>7002</differenceType>
11+
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
12+
<method>java.lang.String parse*(*)</method>
13+
</difference>
14+
<difference>
15+
<differenceType>7002</differenceType>
16+
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
17+
<method>* testIamPermissions(*)</method>
18+
</difference>
19+
<difference>
20+
<differenceType>7006</differenceType>
21+
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
22+
<method>com.google.cloud.datacatalog.v1beta1.List*Response list*(*)</method>
23+
<to>com.google.cloud.datacatalog.v1beta1.DataCatalogClient$List*PagedResponse</to>
24+
</difference>
25+
<difference>
26+
<differenceType>7006</differenceType>
27+
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogSettings*</className>
28+
<method>com.google.api.gax.rpc.UnaryCallSettings* list*Settings()</method>
29+
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
30+
</difference>
31+
<difference>
32+
<differenceType>7006</differenceType>
33+
<className>com/google/cloud/datacatalog/v1beta1/stub/DataCatalogStubSettings*</className>
34+
<method>com.google.api.gax.rpc.UnaryCallSettings* list*Settings()</method>
35+
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
36+
</difference>
37+
<difference>
38+
<differenceType>7006</differenceType>
39+
<className>com/google/cloud/datacatalog/v1beta1/PolicyTagManagerClient</className>
40+
<method>com.google.cloud.datacatalog.v1beta1.List*Response list*(*)</method>
41+
<to>com.google.cloud.datacatalog.v1beta1.PolicyTagManagerClient$List*PagedResponse</to>
42+
</difference>
43+
<difference>
44+
<differenceType>7006</differenceType>
45+
<className>com/google/cloud/datacatalog/v1beta1/PolicyTagManagerSettings*</className>
46+
<method>com.google.api.gax.rpc.UnaryCallSettings* list*Settings()</method>
47+
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
48+
</difference>
49+
<difference>
50+
<differenceType>7006</differenceType>
51+
<className>com/google/cloud/datacatalog/v1beta1/stub/PolicyTagManagerStubSettings*</className>
52+
<method>com.google.api.gax.rpc.UnaryCallSettings* list*Settings()</method>
53+
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
54+
</difference>
55+
<difference>
56+
<differenceType>7004</differenceType>
57+
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
58+
<method>com.google.cloud.datacatalog.v1beta1.DataCatalogClient$SearchCatalogPagedResponse searchCatalog(com.google.cloud.datacatalog.v1beta1.SearchCatalogRequest$Scope, java.lang.String, java.lang.String)</method>
59+
</difference>
60+
</differences>

google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java

+139
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.google.api.gax.paging.AbstractPagedListResponse;
2626
import com.google.api.gax.rpc.PageContext;
2727
import com.google.api.gax.rpc.UnaryCallable;
28+
import com.google.api.resourcenames.ResourceName;
2829
import com.google.cloud.datacatalog.v1.stub.DataCatalogStub;
2930
import com.google.cloud.datacatalog.v1.stub.DataCatalogStubSettings;
3031
import com.google.common.util.concurrent.MoreExecutors;
@@ -3108,6 +3109,77 @@ public final UnaryCallable<ListTagsRequest, ListTagsResponse> listTagsCallable()
31083109
return stub.listTagsCallable();
31093110
}
31103111

3112+
// AUTO-GENERATED DOCUMENTATION AND METHOD
3113+
/**
3114+
* Sets the access control policy for a resource. Replaces any existing policy. Supported
3115+
* resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to
3116+
* manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced
3117+
* to Data Catalog.
3118+
*
3119+
* <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy`
3120+
* to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on
3121+
* entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
3122+
*
3123+
* <p>Sample code:
3124+
*
3125+
* <pre><code>
3126+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3127+
* ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
3128+
* Policy policy = Policy.newBuilder().build();
3129+
* Policy response = dataCatalogClient.setIamPolicy(resource, policy);
3130+
* }
3131+
* </code></pre>
3132+
*
3133+
* @param resource REQUIRED: The resource for which the policy is being specified. See the
3134+
* operation documentation for the appropriate value for this field.
3135+
* @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
3136+
* policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
3137+
* Platform services (such as Projects) might reject them.
3138+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3139+
*/
3140+
public final Policy setIamPolicy(ResourceName resource, Policy policy) {
3141+
SetIamPolicyRequest request =
3142+
SetIamPolicyRequest.newBuilder()
3143+
.setResource(resource == null ? null : resource.toString())
3144+
.setPolicy(policy)
3145+
.build();
3146+
return setIamPolicy(request);
3147+
}
3148+
3149+
// AUTO-GENERATED DOCUMENTATION AND METHOD
3150+
/**
3151+
* Sets the access control policy for a resource. Replaces any existing policy. Supported
3152+
* resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to
3153+
* manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced
3154+
* to Data Catalog.
3155+
*
3156+
* <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy`
3157+
* to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on
3158+
* entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
3159+
*
3160+
* <p>Sample code:
3161+
*
3162+
* <pre><code>
3163+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3164+
* ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
3165+
* Policy policy = Policy.newBuilder().build();
3166+
* Policy response = dataCatalogClient.setIamPolicy(resource.toString(), policy);
3167+
* }
3168+
* </code></pre>
3169+
*
3170+
* @param resource REQUIRED: The resource for which the policy is being specified. See the
3171+
* operation documentation for the appropriate value for this field.
3172+
* @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
3173+
* policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
3174+
* Platform services (such as Projects) might reject them.
3175+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3176+
*/
3177+
public final Policy setIamPolicy(String resource, Policy policy) {
3178+
SetIamPolicyRequest request =
3179+
SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
3180+
return setIamPolicy(request);
3181+
}
3182+
31113183
// AUTO-GENERATED DOCUMENTATION AND METHOD
31123184
/**
31133185
* Sets the access control policy for a resource. Replaces any existing policy. Supported
@@ -3171,6 +3243,73 @@ public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
31713243
return stub.setIamPolicyCallable();
31723244
}
31733245

3246+
// AUTO-GENERATED DOCUMENTATION AND METHOD
3247+
/**
3248+
* Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
3249+
* does not exist. An empty policy is returned if the resource exists but does not have a policy
3250+
* set on it.
3251+
*
3252+
* <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
3253+
* cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
3254+
* resources synced to Data Catalog.
3255+
*
3256+
* <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy`
3257+
* to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on
3258+
* entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
3259+
*
3260+
* <p>Sample code:
3261+
*
3262+
* <pre><code>
3263+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3264+
* ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
3265+
* Policy response = dataCatalogClient.getIamPolicy(resource);
3266+
* }
3267+
* </code></pre>
3268+
*
3269+
* @param resource REQUIRED: The resource for which the policy is being requested. See the
3270+
* operation documentation for the appropriate value for this field.
3271+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3272+
*/
3273+
public final Policy getIamPolicy(ResourceName resource) {
3274+
GetIamPolicyRequest request =
3275+
GetIamPolicyRequest.newBuilder()
3276+
.setResource(resource == null ? null : resource.toString())
3277+
.build();
3278+
return getIamPolicy(request);
3279+
}
3280+
3281+
// AUTO-GENERATED DOCUMENTATION AND METHOD
3282+
/**
3283+
* Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
3284+
* does not exist. An empty policy is returned if the resource exists but does not have a policy
3285+
* set on it.
3286+
*
3287+
* <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
3288+
* cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
3289+
* resources synced to Data Catalog.
3290+
*
3291+
* <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy`
3292+
* to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on
3293+
* entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
3294+
*
3295+
* <p>Sample code:
3296+
*
3297+
* <pre><code>
3298+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3299+
* ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
3300+
* Policy response = dataCatalogClient.getIamPolicy(resource.toString());
3301+
* }
3302+
* </code></pre>
3303+
*
3304+
* @param resource REQUIRED: The resource for which the policy is being requested. See the
3305+
* operation documentation for the appropriate value for this field.
3306+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3307+
*/
3308+
public final Policy getIamPolicy(String resource) {
3309+
GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
3310+
return getIamPolicy(request);
3311+
}
3312+
31743313
// AUTO-GENERATED DOCUMENTATION AND METHOD
31753314
/**
31763315
* Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource

0 commit comments

Comments
 (0)