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

Commit

Permalink
feat: Added support for BigQuery connections entries feat: Added supp…
Browse files Browse the repository at this point in the history
…ort for BigQuery routines entries feat: Added usage_signal field feat: Added labels field feat: Added ReplaceTaxonomy in Policy Tag Manager Serialization API feat: Added support for public tag templates feat: Added support for rich text tags docs: Documentation improvements (#587)

PiperOrigin-RevId: 387350333

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jul 28 08:01:37 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 5b1f7cf1d2e2f8ab028a7090d0981fc774028906
Source-Link: googleapis/googleapis@5b1f7cf
  • Loading branch information
yoshi-automation committed Aug 9, 2021
1 parent 93013ec commit 2e7535b
Show file tree
Hide file tree
Showing 187 changed files with 21,669 additions and 6,963 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Expand Up @@ -27,22 +27,23 @@

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: Policy Tag Manager serialization API service allows clients to manipulate
* their policy tags and taxonomies in serialized format, where taxonomy is a hierarchical group of
* policy tags.
* Service Description: Policy Tag Manager Serialization API service allows you to manipulate your
* policy tags and taxonomies in a serialized format.
*
* <p>Taxonomy is a hierarchical group of policy tags.
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
* <pre>{@code
* try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
* PolicyTagManagerSerializationClient.create()) {
* ImportTaxonomiesRequest request =
* ImportTaxonomiesRequest.newBuilder()
* .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
* ReplaceTaxonomyRequest request =
* ReplaceTaxonomyRequest.newBuilder()
* .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
* .setSerializedTaxonomy(SerializedTaxonomy.newBuilder().build())
* .build();
* ImportTaxonomiesResponse response =
* policyTagManagerSerializationClient.importTaxonomies(request);
* Taxonomy response = policyTagManagerSerializationClient.replaceTaxonomy(request);
* }
* }</pre>
*
Expand Down Expand Up @@ -154,14 +155,82 @@ public PolicyTagManagerSerializationStub getStub() {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new taxonomies (including their policy tags) by importing from inlined source or
* cross-regional source. New taxonomies will be created in a given parent project.
* Replaces (updates) a taxonomy and all its policy tags.
*
* <p>The taxonomy and its entire hierarchy of policy tags must be represented literally by
* `SerializedTaxonomy` and the nested `SerializedPolicyTag` messages.
*
* <p>This operation automatically does the following:
*
* <p>- Deletes the existing policy tags that are missing from the `SerializedPolicyTag`. -
* Creates policy tags that don't have resource names. They are considered new. - Updates policy
* tags with valid resources names accordingly.
*
* <p>Sample code:
*
* <pre>{@code
* try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
* PolicyTagManagerSerializationClient.create()) {
* ReplaceTaxonomyRequest request =
* ReplaceTaxonomyRequest.newBuilder()
* .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
* .setSerializedTaxonomy(SerializedTaxonomy.newBuilder().build())
* .build();
* Taxonomy response = policyTagManagerSerializationClient.replaceTaxonomy(request);
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Taxonomy replaceTaxonomy(ReplaceTaxonomyRequest request) {
return replaceTaxonomyCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Replaces (updates) a taxonomy and all its policy tags.
*
* <p>The taxonomy and its entire hierarchy of policy tags must be represented literally by
* `SerializedTaxonomy` and the nested `SerializedPolicyTag` messages.
*
* <p>This operation automatically does the following:
*
* <p>- Deletes the existing policy tags that are missing from the `SerializedPolicyTag`. -
* Creates policy tags that don't have resource names. They are considered new. - Updates policy
* tags with valid resources names accordingly.
*
* <p>Sample code:
*
* <pre>{@code
* try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
* PolicyTagManagerSerializationClient.create()) {
* ReplaceTaxonomyRequest request =
* ReplaceTaxonomyRequest.newBuilder()
* .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
* .setSerializedTaxonomy(SerializedTaxonomy.newBuilder().build())
* .build();
* ApiFuture<Taxonomy> future =
* policyTagManagerSerializationClient.replaceTaxonomyCallable().futureCall(request);
* // Do something.
* Taxonomy response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<ReplaceTaxonomyRequest, Taxonomy> replaceTaxonomyCallable() {
return stub.replaceTaxonomyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new taxonomies (including their policy tags) in a given project by importing from
* inlined or cross-regional sources.
*
* <p>If using the cross-regional source, a new taxonomy is created by copying from a source in
* another region.
* <p>For a cross-regional source, new taxonomies are created by copying from a source in another
* region.
*
* <p>If using the inlined source, this method provides a way to bulk create taxonomies and policy
* tags using nested proto structure.
* <p>For an inlined source, taxonomies and policy tags are created in bulk using nested protocol
* buffer structures.
*
* <p>Sample code:
*
Expand All @@ -186,14 +255,14 @@ public final ImportTaxonomiesResponse importTaxonomies(ImportTaxonomiesRequest r

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new taxonomies (including their policy tags) by importing from inlined source or
* cross-regional source. New taxonomies will be created in a given parent project.
* Creates new taxonomies (including their policy tags) in a given project by importing from
* inlined or cross-regional sources.
*
* <p>If using the cross-regional source, a new taxonomy is created by copying from a source in
* another region.
* <p>For a cross-regional source, new taxonomies are created by copying from a source in another
* region.
*
* <p>If using the inlined source, this method provides a way to bulk create taxonomies and policy
* tags using nested proto structure.
* <p>For an inlined source, taxonomies and policy tags are created in bulk using nested protocol
* buffer structures.
*
* <p>Sample code:
*
Expand All @@ -218,11 +287,11 @@ public final ImportTaxonomiesResponse importTaxonomies(ImportTaxonomiesRequest r

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Exports taxonomies as the requested type and returns the taxonomies including their policy
* tags. The requested taxonomies must belong to one project.
* Exports taxonomies in the requested type and returns them, including their policy tags. The
* requested taxonomies must belong to the same project.
*
* <p>SerializedTaxonomy protos with nested policy tags that are generated by this method can be
* used as input for future ImportTaxonomies calls.
* <p>This method generates `SerializedTaxonomy` protocol buffers with nested policy tags that can
* be used as input for `ImportTaxonomies` calls.
*
* <p>Sample code:
*
Expand All @@ -248,11 +317,11 @@ public final ExportTaxonomiesResponse exportTaxonomies(ExportTaxonomiesRequest r

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Exports taxonomies as the requested type and returns the taxonomies including their policy
* tags. The requested taxonomies must belong to one project.
* Exports taxonomies in the requested type and returns them, including their policy tags. The
* requested taxonomies must belong to the same project.
*
* <p>SerializedTaxonomy protos with nested policy tags that are generated by this method can be
* used as input for future ImportTaxonomies calls.
* <p>This method generates `SerializedTaxonomy` protocol buffers with nested policy tags that can
* be used as input for `ImportTaxonomies` calls.
*
* <p>Sample code:
*
Expand Down
Expand Up @@ -46,16 +46,16 @@
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of importTaxonomies to 30 seconds:
* <p>For example, to set the total timeout of replaceTaxonomy to 30 seconds:
*
* <pre>{@code
* PolicyTagManagerSerializationSettings.Builder policyTagManagerSerializationSettingsBuilder =
* PolicyTagManagerSerializationSettings.newBuilder();
* policyTagManagerSerializationSettingsBuilder
* .importTaxonomiesSettings()
* .replaceTaxonomySettings()
* .setRetrySettings(
* policyTagManagerSerializationSettingsBuilder
* .importTaxonomiesSettings()
* .replaceTaxonomySettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
Expand All @@ -68,6 +68,12 @@
public class PolicyTagManagerSerializationSettings
extends ClientSettings<PolicyTagManagerSerializationSettings> {

/** Returns the object with the settings used for calls to replaceTaxonomy. */
public UnaryCallSettings<ReplaceTaxonomyRequest, Taxonomy> replaceTaxonomySettings() {
return ((PolicyTagManagerSerializationStubSettings) getStubSettings())
.replaceTaxonomySettings();
}

/** Returns the object with the settings used for calls to importTaxonomies. */
public UnaryCallSettings<ImportTaxonomiesRequest, ImportTaxonomiesResponse>
importTaxonomiesSettings() {
Expand Down Expand Up @@ -181,6 +187,11 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to replaceTaxonomy. */
public UnaryCallSettings.Builder<ReplaceTaxonomyRequest, Taxonomy> replaceTaxonomySettings() {
return getStubSettingsBuilder().replaceTaxonomySettings();
}

/** Returns the builder for the settings used for calls to importTaxonomies. */
public UnaryCallSettings.Builder<ImportTaxonomiesRequest, ImportTaxonomiesResponse>
importTaxonomiesSettings() {
Expand Down
Expand Up @@ -156,6 +156,9 @@
},
"ImportTaxonomies": {
"methods": ["importTaxonomies", "importTaxonomiesCallable"]
},
"ReplaceTaxonomy": {
"methods": ["replaceTaxonomy", "replaceTaxonomyCallable"]
}
}
}
Expand Down
Expand Up @@ -19,8 +19,8 @@
*
* <p>======================= DataCatalogClient =======================
*
* <p>Service Description: Data Catalog API service allows clients to discover, understand, and
* manage their data.
* <p>Service Description: Data Catalog API service allows you to discover, understand, and manage
* your data.
*
* <p>Sample for DataCatalogClient:
*
Expand All @@ -35,8 +35,8 @@
*
* <p>======================= PolicyTagManagerClient =======================
*
* <p>Service Description: Policy Tag Manager API service allows clients to manage their policy tags
* and taxonomies.
* <p>Service Description: Policy Tag Manager API service allows you to manage your policy tags and
* taxonomies.
*
* <p>Policy tags are used to tag BigQuery columns and apply additional access control policies. A
* taxonomy is a hierarchical grouping of policy tags that classify data along a common axis.
Expand All @@ -53,21 +53,22 @@
*
* <p>======================= PolicyTagManagerSerializationClient =======================
*
* <p>Service Description: Policy Tag Manager serialization API service allows clients to manipulate
* their policy tags and taxonomies in serialized format, where taxonomy is a hierarchical group of
* policy tags.
* <p>Service Description: Policy Tag Manager Serialization API service allows you to manipulate
* your policy tags and taxonomies in a serialized format.
*
* <p>Taxonomy is a hierarchical group of policy tags.
*
* <p>Sample for PolicyTagManagerSerializationClient:
*
* <pre>{@code
* try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
* PolicyTagManagerSerializationClient.create()) {
* ImportTaxonomiesRequest request =
* ImportTaxonomiesRequest.newBuilder()
* .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
* ReplaceTaxonomyRequest request =
* ReplaceTaxonomyRequest.newBuilder()
* .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
* .setSerializedTaxonomy(SerializedTaxonomy.newBuilder().build())
* .build();
* ImportTaxonomiesResponse response =
* policyTagManagerSerializationClient.importTaxonomies(request);
* Taxonomy response = policyTagManagerSerializationClient.replaceTaxonomy(request);
* }
* }</pre>
*/
Expand Down
Expand Up @@ -27,6 +27,8 @@
import com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse;
import com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest;
import com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse;
import com.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest;
import com.google.cloud.datacatalog.v1.Taxonomy;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.stub.GrpcOperationsStub;
import io.grpc.MethodDescriptor;
Expand All @@ -44,6 +46,17 @@
*/
@Generated("by gapic-generator-java")
public class GrpcPolicyTagManagerSerializationStub extends PolicyTagManagerSerializationStub {
private static final MethodDescriptor<ReplaceTaxonomyRequest, Taxonomy>
replaceTaxonomyMethodDescriptor =
MethodDescriptor.<ReplaceTaxonomyRequest, Taxonomy>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ReplaceTaxonomy")
.setRequestMarshaller(
ProtoUtils.marshaller(ReplaceTaxonomyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Taxonomy.getDefaultInstance()))
.build();

private static final MethodDescriptor<ImportTaxonomiesRequest, ImportTaxonomiesResponse>
importTaxonomiesMethodDescriptor =
MethodDescriptor.<ImportTaxonomiesRequest, ImportTaxonomiesResponse>newBuilder()
Expand All @@ -68,6 +81,7 @@ public class GrpcPolicyTagManagerSerializationStub extends PolicyTagManagerSeria
ProtoUtils.marshaller(ExportTaxonomiesResponse.getDefaultInstance()))
.build();

private final UnaryCallable<ReplaceTaxonomyRequest, Taxonomy> replaceTaxonomyCallable;
private final UnaryCallable<ImportTaxonomiesRequest, ImportTaxonomiesResponse>
importTaxonomiesCallable;
private final UnaryCallable<ExportTaxonomiesRequest, ExportTaxonomiesResponse>
Expand Down Expand Up @@ -120,6 +134,19 @@ protected GrpcPolicyTagManagerSerializationStub(
this.callableFactory = callableFactory;
this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);

GrpcCallSettings<ReplaceTaxonomyRequest, Taxonomy> replaceTaxonomyTransportSettings =
GrpcCallSettings.<ReplaceTaxonomyRequest, Taxonomy>newBuilder()
.setMethodDescriptor(replaceTaxonomyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ReplaceTaxonomyRequest>() {
@Override
public Map<String, String> extract(ReplaceTaxonomyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<ImportTaxonomiesRequest, ImportTaxonomiesResponse>
importTaxonomiesTransportSettings =
GrpcCallSettings.<ImportTaxonomiesRequest, ImportTaxonomiesResponse>newBuilder()
Expand Down Expand Up @@ -149,6 +176,9 @@ public Map<String, String> extract(ExportTaxonomiesRequest request) {
})
.build();

this.replaceTaxonomyCallable =
callableFactory.createUnaryCallable(
replaceTaxonomyTransportSettings, settings.replaceTaxonomySettings(), clientContext);
this.importTaxonomiesCallable =
callableFactory.createUnaryCallable(
importTaxonomiesTransportSettings, settings.importTaxonomiesSettings(), clientContext);
Expand All @@ -164,6 +194,11 @@ public GrpcOperationsStub getOperationsStub() {
return operationsStub;
}

@Override
public UnaryCallable<ReplaceTaxonomyRequest, Taxonomy> replaceTaxonomyCallable() {
return replaceTaxonomyCallable;
}

@Override
public UnaryCallable<ImportTaxonomiesRequest, ImportTaxonomiesResponse>
importTaxonomiesCallable() {
Expand Down
Expand Up @@ -22,6 +22,8 @@
import com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse;
import com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest;
import com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse;
import com.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest;
import com.google.cloud.datacatalog.v1.Taxonomy;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
Expand All @@ -33,6 +35,10 @@
@Generated("by gapic-generator-java")
public abstract class PolicyTagManagerSerializationStub implements BackgroundResource {

public UnaryCallable<ReplaceTaxonomyRequest, Taxonomy> replaceTaxonomyCallable() {
throw new UnsupportedOperationException("Not implemented: replaceTaxonomyCallable()");
}

public UnaryCallable<ImportTaxonomiesRequest, ImportTaxonomiesResponse>
importTaxonomiesCallable() {
throw new UnsupportedOperationException("Not implemented: importTaxonomiesCallable()");
Expand Down

0 comments on commit 2e7535b

Please sign in to comment.