Skip to content

feat: [datacatalog] add support for new ImportEntries() API, including format of the dump #9214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 15, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions java-datacatalog/google-cloud-datacatalog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-iam-v1</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
Expand All @@ -39,6 +40,7 @@
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -228,6 +230,17 @@ public UnaryCallSettings<DeleteTagRequest, Empty> deleteTagSettings() {
return ((DataCatalogStubSettings) getStubSettings()).listTagsSettings();
}

/** Returns the object with the settings used for calls to reconcileTags. */
public UnaryCallSettings<ReconcileTagsRequest, Operation> reconcileTagsSettings() {
return ((DataCatalogStubSettings) getStubSettings()).reconcileTagsSettings();
}

/** Returns the object with the settings used for calls to reconcileTags. */
public OperationCallSettings<ReconcileTagsRequest, ReconcileTagsResponse, ReconcileTagsMetadata>
reconcileTagsOperationSettings() {
return ((DataCatalogStubSettings) getStubSettings()).reconcileTagsOperationSettings();
}

/** Returns the object with the settings used for calls to starEntry. */
public UnaryCallSettings<StarEntryRequest, StarEntryResponse> starEntrySettings() {
return ((DataCatalogStubSettings) getStubSettings()).starEntrySettings();
Expand All @@ -254,6 +267,17 @@ public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
return ((DataCatalogStubSettings) getStubSettings()).testIamPermissionsSettings();
}

/** Returns the object with the settings used for calls to importEntries. */
public UnaryCallSettings<ImportEntriesRequest, Operation> importEntriesSettings() {
return ((DataCatalogStubSettings) getStubSettings()).importEntriesSettings();
}

/** Returns the object with the settings used for calls to importEntries. */
public OperationCallSettings<ImportEntriesRequest, ImportEntriesResponse, ImportEntriesMetadata>
importEntriesOperationSettings() {
return ((DataCatalogStubSettings) getStubSettings()).importEntriesOperationSettings();
}

public static final DataCatalogSettings create(DataCatalogStubSettings stub) throws IOException {
return new DataCatalogSettings.Builder(stub.toBuilder()).build();
}
Expand Down Expand Up @@ -521,6 +545,18 @@ public UnaryCallSettings.Builder<DeleteTagRequest, Empty> deleteTagSettings() {
return getStubSettingsBuilder().listTagsSettings();
}

/** Returns the builder for the settings used for calls to reconcileTags. */
public UnaryCallSettings.Builder<ReconcileTagsRequest, Operation> reconcileTagsSettings() {
return getStubSettingsBuilder().reconcileTagsSettings();
}

/** Returns the builder for the settings used for calls to reconcileTags. */
public OperationCallSettings.Builder<
ReconcileTagsRequest, ReconcileTagsResponse, ReconcileTagsMetadata>
reconcileTagsOperationSettings() {
return getStubSettingsBuilder().reconcileTagsOperationSettings();
}

/** Returns the builder for the settings used for calls to starEntry. */
public UnaryCallSettings.Builder<StarEntryRequest, StarEntryResponse> starEntrySettings() {
return getStubSettingsBuilder().starEntrySettings();
Expand Down Expand Up @@ -548,6 +584,18 @@ public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettin
return getStubSettingsBuilder().testIamPermissionsSettings();
}

/** Returns the builder for the settings used for calls to importEntries. */
public UnaryCallSettings.Builder<ImportEntriesRequest, Operation> importEntriesSettings() {
return getStubSettingsBuilder().importEntriesSettings();
}

/** Returns the builder for the settings used for calls to importEntries. */
public OperationCallSettings.Builder<
ImportEntriesRequest, ImportEntriesResponse, ImportEntriesMetadata>
importEntriesOperationSettings() {
return getStubSettingsBuilder().importEntriesOperationSettings();
}

@Override
public DataCatalogSettings build() throws IOException {
return new DataCatalogSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ public final ListTaxonomiesPagedResponse listTaxonomies(String parent) {
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .build();
* for (Taxonomy element : policyTagManagerClient.listTaxonomies(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -622,6 +623,7 @@ public final ListTaxonomiesPagedResponse listTaxonomies(ListTaxonomiesRequest re
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture<Taxonomy> future =
* policyTagManagerClient.listTaxonomiesPagedCallable().futureCall(request);
Expand Down Expand Up @@ -655,6 +657,7 @@ public final ListTaxonomiesPagedResponse listTaxonomies(ListTaxonomiesRequest re
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
* ListTaxonomiesResponse response =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"GetTagTemplate": {
"methods": ["getTagTemplate", "getTagTemplate", "getTagTemplate", "getTagTemplateCallable"]
},
"ImportEntries": {
"methods": ["importEntriesAsync", "importEntriesOperationCallable", "importEntriesCallable"]
},
"ListEntries": {
"methods": ["listEntries", "listEntries", "listEntries", "listEntriesPagedCallable", "listEntriesCallable"]
},
Expand All @@ -70,6 +73,9 @@
"ModifyEntryOverview": {
"methods": ["modifyEntryOverview", "modifyEntryOverviewCallable"]
},
"ReconcileTags": {
"methods": ["reconcileTagsAsync", "reconcileTagsOperationCallable", "reconcileTagsCallable"]
},
"RenameTagTemplateField": {
"methods": ["renameTagTemplateField", "renameTagTemplateField", "renameTagTemplateField", "renameTagTemplateFieldCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import static com.google.cloud.datacatalog.v1.DataCatalogClient.SearchCatalogPagedResponse;

import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.datacatalog.v1.Contacts;
import com.google.cloud.datacatalog.v1.CreateEntryGroupRequest;
Expand All @@ -40,6 +41,9 @@
import com.google.cloud.datacatalog.v1.GetEntryGroupRequest;
import com.google.cloud.datacatalog.v1.GetEntryRequest;
import com.google.cloud.datacatalog.v1.GetTagTemplateRequest;
import com.google.cloud.datacatalog.v1.ImportEntriesMetadata;
import com.google.cloud.datacatalog.v1.ImportEntriesRequest;
import com.google.cloud.datacatalog.v1.ImportEntriesResponse;
import com.google.cloud.datacatalog.v1.ListEntriesRequest;
import com.google.cloud.datacatalog.v1.ListEntriesResponse;
import com.google.cloud.datacatalog.v1.ListEntryGroupsRequest;
Expand All @@ -49,6 +53,9 @@
import com.google.cloud.datacatalog.v1.LookupEntryRequest;
import com.google.cloud.datacatalog.v1.ModifyEntryContactsRequest;
import com.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest;
import com.google.cloud.datacatalog.v1.ReconcileTagsMetadata;
import com.google.cloud.datacatalog.v1.ReconcileTagsRequest;
import com.google.cloud.datacatalog.v1.ReconcileTagsResponse;
import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest;
import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest;
import com.google.cloud.datacatalog.v1.SearchCatalogRequest;
Expand All @@ -70,6 +77,8 @@
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import com.google.protobuf.Empty;
import javax.annotation.Generated;

Expand All @@ -82,6 +91,14 @@
@Generated("by gapic-generator-java")
public abstract class DataCatalogStub implements BackgroundResource {

public OperationsStub getOperationsStub() {
return null;
}

public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
return null;
}

public UnaryCallable<SearchCatalogRequest, SearchCatalogPagedResponse>
searchCatalogPagedCallable() {
throw new UnsupportedOperationException("Not implemented: searchCatalogPagedCallable()");
Expand Down Expand Up @@ -213,6 +230,15 @@ public UnaryCallable<ListTagsRequest, ListTagsResponse> listTagsCallable() {
throw new UnsupportedOperationException("Not implemented: listTagsCallable()");
}

public OperationCallable<ReconcileTagsRequest, ReconcileTagsResponse, ReconcileTagsMetadata>
reconcileTagsOperationCallable() {
throw new UnsupportedOperationException("Not implemented: reconcileTagsOperationCallable()");
}

public UnaryCallable<ReconcileTagsRequest, Operation> reconcileTagsCallable() {
throw new UnsupportedOperationException("Not implemented: reconcileTagsCallable()");
}

public UnaryCallable<StarEntryRequest, StarEntryResponse> starEntryCallable() {
throw new UnsupportedOperationException("Not implemented: starEntryCallable()");
}
Expand All @@ -234,6 +260,15 @@ public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
}

public OperationCallable<ImportEntriesRequest, ImportEntriesResponse, ImportEntriesMetadata>
importEntriesOperationCallable() {
throw new UnsupportedOperationException("Not implemented: importEntriesOperationCallable()");
}

public UnaryCallable<ImportEntriesRequest, Operation> importEntriesCallable() {
throw new UnsupportedOperationException("Not implemented: importEntriesCallable()");
}

@Override
public abstract void close();
}
Loading