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

feat(v1beta1)!: regenerate with Gapic V2 pagination settings #196

Merged
merged 5 commits into from Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -0,0 +1,8 @@
# Code owners file.
# This file controls who is tagged for review for any given pull request.

# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax

# The java-samples-reviewers team is the default owner for samples changes
samples/**/*.java @googleapis/java-samples-reviewers
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>5.3.0</version>
<version>5.5.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
60 changes: 60 additions & 0 deletions google-cloud-datacatalog/clirr-ignored-differences.xml
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
<method>java.lang.String format*(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
<method>java.lang.String parse*(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
<method>* testIamPermissions(*)</method>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
<method>com.google.cloud.datacatalog.v1beta1.List*Response list*(*)</method>
<to>com.google.cloud.datacatalog.v1beta1.DataCatalogClient$List*PagedResponse</to>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogSettings*</className>
<method>com.google.api.gax.rpc.UnaryCallSettings* list*Settings()</method>
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/stub/DataCatalogStubSettings*</className>
<method>com.google.api.gax.rpc.UnaryCallSettings* list*Settings()</method>
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/PolicyTagManagerClient</className>
<method>com.google.cloud.datacatalog.v1beta1.List*Response list*(*)</method>
<to>com.google.cloud.datacatalog.v1beta1.PolicyTagManagerClient$List*PagedResponse</to>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/PolicyTagManagerSettings*</className>
<method>com.google.api.gax.rpc.UnaryCallSettings* list*Settings()</method>
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/stub/PolicyTagManagerStubSettings*</className>
<method>com.google.api.gax.rpc.UnaryCallSettings* list*Settings()</method>
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
</difference>
<difference>
<differenceType>7004</differenceType>
<className>com/google/cloud/datacatalog/v1beta1/DataCatalogClient</className>
<method>com.google.cloud.datacatalog.v1beta1.DataCatalogClient$SearchCatalogPagedResponse searchCatalog(com.google.cloud.datacatalog.v1beta1.SearchCatalogRequest$Scope, java.lang.String, java.lang.String)</method>
</difference>
</differences>
Expand Up @@ -25,6 +25,7 @@
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.api.resourcenames.ResourceName;
import com.google.cloud.datacatalog.v1.stub.DataCatalogStub;
import com.google.cloud.datacatalog.v1.stub.DataCatalogStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
Expand Down Expand Up @@ -3108,6 +3109,77 @@ public final UnaryCallable<ListTagsRequest, ListTagsResponse> listTagsCallable()
return stub.listTagsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the access control policy for a resource. Replaces any existing policy. Supported
* resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to
* manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced
* to Data Catalog.
*
* <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy`
* to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on
* entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
*
* <p>Sample code:
*
* <pre><code>
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
* ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
* Policy policy = Policy.newBuilder().build();
* Policy response = dataCatalogClient.setIamPolicy(resource, policy);
* }
* </code></pre>
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the
* operation documentation for the appropriate value for this field.
* @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
* policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
* Platform services (such as Projects) might reject them.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Policy setIamPolicy(ResourceName resource, Policy policy) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(resource == null ? null : resource.toString())
.setPolicy(policy)
.build();
return setIamPolicy(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the access control policy for a resource. Replaces any existing policy. Supported
* resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to
* manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced
* to Data Catalog.
*
* <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy`
* to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on
* entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
*
* <p>Sample code:
*
* <pre><code>
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
* ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
* Policy policy = Policy.newBuilder().build();
* Policy response = dataCatalogClient.setIamPolicy(resource.toString(), policy);
* }
* </code></pre>
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the
* operation documentation for the appropriate value for this field.
* @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
* policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
* Platform services (such as Projects) might reject them.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Policy setIamPolicy(String resource, Policy policy) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
return setIamPolicy(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Sets the access control policy for a resource. Replaces any existing policy. Supported
Expand Down Expand Up @@ -3171,6 +3243,73 @@ public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
return stub.setIamPolicyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
* does not exist. An empty policy is returned if the resource exists but does not have a policy
* set on it.
*
* <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
* cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
* resources synced to Data Catalog.
*
* <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy`
* to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on
* entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
*
* <p>Sample code:
*
* <pre><code>
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
* ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
* Policy response = dataCatalogClient.getIamPolicy(resource);
* }
* </code></pre>
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the
* operation documentation for the appropriate value for this field.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Policy getIamPolicy(ResourceName resource) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(resource == null ? null : resource.toString())
.build();
return getIamPolicy(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
* does not exist. An empty policy is returned if the resource exists but does not have a policy
* set on it.
*
* <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
* cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
* resources synced to Data Catalog.
*
* <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy`
* to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on
* entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
*
* <p>Sample code:
*
* <pre><code>
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
* ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
* Policy response = dataCatalogClient.getIamPolicy(resource.toString());
* }
* </code></pre>
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the
* operation documentation for the appropriate value for this field.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Policy getIamPolicy(String resource) {
GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
return getIamPolicy(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
Expand Down