com.google.cloud.datacatalog.v1beta1.stub.HttpJsonDataCatalogStub Maven / Gradle / Ivy
Show all versions of google-cloud-datacatalog Show documentation
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.datacatalog.v1beta1.stub;
import static com.google.cloud.datacatalog.v1beta1.DataCatalogClient.ListEntriesPagedResponse;
import static com.google.cloud.datacatalog.v1beta1.DataCatalogClient.ListEntryGroupsPagedResponse;
import static com.google.cloud.datacatalog.v1beta1.DataCatalogClient.ListTagsPagedResponse;
import static com.google.cloud.datacatalog.v1beta1.DataCatalogClient.SearchCatalogPagedResponse;
import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.httpjson.ApiMethodDescriptor;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
import com.google.api.gax.httpjson.ProtoMessageResponseParser;
import com.google.api.gax.httpjson.ProtoRestSerializer;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest;
import com.google.cloud.datacatalog.v1beta1.CreateEntryRequest;
import com.google.cloud.datacatalog.v1beta1.CreateTagRequest;
import com.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest;
import com.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest;
import com.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest;
import com.google.cloud.datacatalog.v1beta1.DeleteEntryRequest;
import com.google.cloud.datacatalog.v1beta1.DeleteTagRequest;
import com.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest;
import com.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest;
import com.google.cloud.datacatalog.v1beta1.Entry;
import com.google.cloud.datacatalog.v1beta1.EntryGroup;
import com.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest;
import com.google.cloud.datacatalog.v1beta1.GetEntryRequest;
import com.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest;
import com.google.cloud.datacatalog.v1beta1.ListEntriesRequest;
import com.google.cloud.datacatalog.v1beta1.ListEntriesResponse;
import com.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest;
import com.google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse;
import com.google.cloud.datacatalog.v1beta1.ListTagsRequest;
import com.google.cloud.datacatalog.v1beta1.ListTagsResponse;
import com.google.cloud.datacatalog.v1beta1.LookupEntryRequest;
import com.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldEnumValueRequest;
import com.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest;
import com.google.cloud.datacatalog.v1beta1.SearchCatalogRequest;
import com.google.cloud.datacatalog.v1beta1.SearchCatalogResponse;
import com.google.cloud.datacatalog.v1beta1.Tag;
import com.google.cloud.datacatalog.v1beta1.TagTemplate;
import com.google.cloud.datacatalog.v1beta1.TagTemplateField;
import com.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest;
import com.google.cloud.datacatalog.v1beta1.UpdateEntryRequest;
import com.google.cloud.datacatalog.v1beta1.UpdateTagRequest;
import com.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest;
import com.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.protobuf.Empty;
import com.google.protobuf.TypeRegistry;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* REST stub implementation for the DataCatalog service API.
*
* This class is for advanced usage and reflects the underlying API directly.
*/
@BetaApi
@Generated("by gapic-generator-java")
public class HttpJsonDataCatalogStub extends DataCatalogStub {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
private static final ApiMethodDescriptor
searchCatalogMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/SearchCatalog")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/catalog:search",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(SearchCatalogResponse.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
createEntryGroupMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/CreateEntryGroup")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{parent=projects/*/locations/*}/entryGroups",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "parent", request.getParent());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(
fields, "entryGroupId", request.getEntryGroupId());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("entryGroup", request.getEntryGroup(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(EntryGroup.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
updateEntryGroupMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/UpdateEntryGroup")
.setHttpMethod("PATCH")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{entryGroup.name=projects/*/locations/*/entryGroups/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(
fields, "entryGroup.name", request.getEntryGroup().getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("entryGroup", request.getEntryGroup(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(EntryGroup.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
getEntryGroupMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/GetEntryGroup")
.setHttpMethod("GET")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/entryGroups/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "readMask", request.getReadMask());
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(EntryGroup.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
deleteEntryGroupMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/DeleteEntryGroup")
.setHttpMethod("DELETE")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/entryGroups/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "force", request.getForce());
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Empty.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
listEntryGroupsMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/ListEntryGroups")
.setHttpMethod("GET")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{parent=projects/*/locations/*}/entryGroups",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "parent", request.getParent());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(ListEntryGroupsResponse.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor createEntryMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/CreateEntry")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "parent", request.getParent());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "entryId", request.getEntryId());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create().toBody("entry", request.getEntry(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Entry.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor updateEntryMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/UpdateEntry")
.setHttpMethod("PATCH")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "entry.name", request.getEntry().getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create().toBody("entry", request.getEntry(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Entry.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor deleteEntryMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/DeleteEntry")
.setHttpMethod("DELETE")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Empty.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor getEntryMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/GetEntry")
.setHttpMethod("GET")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Entry.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor lookupEntryMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/LookupEntry")
.setHttpMethod("GET")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/entries:lookup",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(
fields, "linkedResource", request.getLinkedResource());
serializer.putQueryParam(fields, "sqlResource", request.getSqlResource());
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Entry.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
listEntriesMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/ListEntries")
.setHttpMethod("GET")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "parent", request.getParent());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
serializer.putQueryParam(fields, "readMask", request.getReadMask());
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(ListEntriesResponse.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
createTagTemplateMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/CreateTagTemplate")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{parent=projects/*/locations/*}/tagTemplates",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "parent", request.getParent());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(
fields, "tagTemplateId", request.getTagTemplateId());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("tagTemplate", request.getTagTemplate(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(TagTemplate.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
getTagTemplateMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/GetTagTemplate")
.setHttpMethod("GET")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/tagTemplates/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(TagTemplate.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
updateTagTemplateMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTagTemplate")
.setHttpMethod("PATCH")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{tagTemplate.name=projects/*/locations/*/tagTemplates/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(
fields, "tagTemplate.name", request.getTagTemplate().getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("tagTemplate", request.getTagTemplate(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(TagTemplate.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
deleteTagTemplateMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTagTemplate")
.setHttpMethod("DELETE")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/tagTemplates/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "force", request.getForce());
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Empty.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
createTagTemplateFieldMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName(
"google.cloud.datacatalog.v1beta1.DataCatalog/CreateTagTemplateField")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{parent=projects/*/locations/*/tagTemplates/*}/fields",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "parent", request.getParent());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(
fields, "tagTemplateFieldId", request.getTagTemplateFieldId());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("tagTemplateField", request.getTagTemplateField(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(TagTemplateField.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
updateTagTemplateFieldMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName(
"google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTagTemplateField")
.setHttpMethod("PATCH")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("tagTemplateField", request.getTagTemplateField(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(TagTemplateField.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
renameTagTemplateFieldMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName(
"google.cloud.datacatalog.v1beta1.DataCatalog/RenameTagTemplateField")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearName().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(TagTemplateField.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
renameTagTemplateFieldEnumValueMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName(
"google.cloud.datacatalog.v1beta1.DataCatalog/RenameTagTemplateFieldEnumValue")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearName().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(TagTemplateField.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
deleteTagTemplateFieldMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName(
"google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTagTemplateField")
.setHttpMethod("DELETE")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "force", request.getForce());
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Empty.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor createTagMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/CreateTag")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "parent", request.getParent());
return fields;
})
.setAdditionalPaths("/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags")
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create().toBody("tag", request.getTag(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Tag.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor updateTagMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTag")
.setHttpMethod("PATCH")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "tag.name", request.getTag().getName());
return fields;
})
.setAdditionalPaths(
"/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}")
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create().toBody("tag", request.getTag(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Tag.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor deleteTagMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTag")
.setHttpMethod("DELETE")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "name", request.getName());
return fields;
})
.setAdditionalPaths("/v1beta1/{name=projects/*/locations/*/entryGroups/*/tags/*}")
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Empty.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
listTagsMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/ListTags")
.setHttpMethod("GET")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "parent", request.getParent());
return fields;
})
.setAdditionalPaths(
"/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags")
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
return fields;
})
.setRequestBodyExtractor(request -> null)
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(ListTagsResponse.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
setIamPolicyMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/SetIamPolicy")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "resource", request.getResource());
return fields;
})
.setAdditionalPaths(
"/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy")
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearResource().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Policy.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
getIamPolicyMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/GetIamPolicy")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "resource", request.getResource());
return fields;
})
.setAdditionalPaths(
"/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy",
"/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy")
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearResource().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(Policy.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private static final ApiMethodDescriptor
testIamPermissionsMethodDescriptor =
ApiMethodDescriptor.newBuilder()
.setFullMethodName("google.cloud.datacatalog.v1beta1.DataCatalog/TestIamPermissions")
.setHttpMethod("POST")
.setType(ApiMethodDescriptor.MethodType.UNARY)
.setRequestFormatter(
ProtoMessageRequestFormatter.newBuilder()
.setPath(
"/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions",
request -> {
Map fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
serializer.putPathParam(fields, "resource", request.getResource());
return fields;
})
.setAdditionalPaths(
"/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions",
"/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions")
.setQueryParamsExtractor(
request -> {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearResource().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
.setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance())
.setDefaultTypeRegistry(typeRegistry)
.build())
.build();
private final UnaryCallable searchCatalogCallable;
private final UnaryCallable
searchCatalogPagedCallable;
private final UnaryCallable createEntryGroupCallable;
private final UnaryCallable updateEntryGroupCallable;
private final UnaryCallable getEntryGroupCallable;
private final UnaryCallable deleteEntryGroupCallable;
private final UnaryCallable
listEntryGroupsCallable;
private final UnaryCallable
listEntryGroupsPagedCallable;
private final UnaryCallable createEntryCallable;
private final UnaryCallable updateEntryCallable;
private final UnaryCallable deleteEntryCallable;
private final UnaryCallable getEntryCallable;
private final UnaryCallable lookupEntryCallable;
private final UnaryCallable listEntriesCallable;
private final UnaryCallable
listEntriesPagedCallable;
private final UnaryCallable createTagTemplateCallable;
private final UnaryCallable getTagTemplateCallable;
private final UnaryCallable updateTagTemplateCallable;
private final UnaryCallable deleteTagTemplateCallable;
private final UnaryCallable
createTagTemplateFieldCallable;
private final UnaryCallable
updateTagTemplateFieldCallable;
private final UnaryCallable
renameTagTemplateFieldCallable;
private final UnaryCallable
renameTagTemplateFieldEnumValueCallable;
private final UnaryCallable deleteTagTemplateFieldCallable;
private final UnaryCallable createTagCallable;
private final UnaryCallable