Skip to content

Commit

Permalink
Regenerate dialogflow client (#4764)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and Praful Makani committed Mar 28, 2019
1 parent 00fcb69 commit a954d42
Show file tree
Hide file tree
Showing 15 changed files with 755 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.dialogflow.v2.Agent;
import com.google.cloud.dialogflow.v2.ExportAgentRequest;
Expand All @@ -34,13 +35,15 @@
import com.google.cloud.dialogflow.v2.SearchAgentsRequest;
import com.google.cloud.dialogflow.v2.SearchAgentsResponse;
import com.google.cloud.dialogflow.v2.TrainAgentRequest;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import com.google.protobuf.Struct;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down Expand Up @@ -157,26 +160,80 @@ protected GrpcAgentsStub(
GrpcCallSettings<GetAgentRequest, Agent> getAgentTransportSettings =
GrpcCallSettings.<GetAgentRequest, Agent>newBuilder()
.setMethodDescriptor(getAgentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetAgentRequest>() {
@Override
public Map<String, String> extract(GetAgentRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<SearchAgentsRequest, SearchAgentsResponse> searchAgentsTransportSettings =
GrpcCallSettings.<SearchAgentsRequest, SearchAgentsResponse>newBuilder()
.setMethodDescriptor(searchAgentsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SearchAgentsRequest>() {
@Override
public Map<String, String> extract(SearchAgentsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<TrainAgentRequest, Operation> trainAgentTransportSettings =
GrpcCallSettings.<TrainAgentRequest, Operation>newBuilder()
.setMethodDescriptor(trainAgentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<TrainAgentRequest>() {
@Override
public Map<String, String> extract(TrainAgentRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<ExportAgentRequest, Operation> exportAgentTransportSettings =
GrpcCallSettings.<ExportAgentRequest, Operation>newBuilder()
.setMethodDescriptor(exportAgentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ExportAgentRequest>() {
@Override
public Map<String, String> extract(ExportAgentRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<ImportAgentRequest, Operation> importAgentTransportSettings =
GrpcCallSettings.<ImportAgentRequest, Operation>newBuilder()
.setMethodDescriptor(importAgentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ImportAgentRequest>() {
@Override
public Map<String, String> extract(ImportAgentRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<RestoreAgentRequest, Operation> restoreAgentTransportSettings =
GrpcCallSettings.<RestoreAgentRequest, Operation>newBuilder()
.setMethodDescriptor(restoreAgentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<RestoreAgentRequest>() {
@Override
public Map<String, String> extract(RestoreAgentRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();

this.getAgentCallable =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.dialogflow.v2.Context;
import com.google.cloud.dialogflow.v2.CreateContextRequest;
Expand All @@ -32,10 +33,12 @@
import com.google.cloud.dialogflow.v2.ListContextsRequest;
import com.google.cloud.dialogflow.v2.ListContextsResponse;
import com.google.cloud.dialogflow.v2.UpdateContextRequest;
import com.google.common.collect.ImmutableMap;
import com.google.protobuf.Empty;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down Expand Up @@ -150,26 +153,80 @@ protected GrpcContextsStub(
GrpcCallSettings<ListContextsRequest, ListContextsResponse> listContextsTransportSettings =
GrpcCallSettings.<ListContextsRequest, ListContextsResponse>newBuilder()
.setMethodDescriptor(listContextsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListContextsRequest>() {
@Override
public Map<String, String> extract(ListContextsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<GetContextRequest, Context> getContextTransportSettings =
GrpcCallSettings.<GetContextRequest, Context>newBuilder()
.setMethodDescriptor(getContextMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetContextRequest>() {
@Override
public Map<String, String> extract(GetContextRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<CreateContextRequest, Context> createContextTransportSettings =
GrpcCallSettings.<CreateContextRequest, Context>newBuilder()
.setMethodDescriptor(createContextMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateContextRequest>() {
@Override
public Map<String, String> extract(CreateContextRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateContextRequest, Context> updateContextTransportSettings =
GrpcCallSettings.<UpdateContextRequest, Context>newBuilder()
.setMethodDescriptor(updateContextMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateContextRequest>() {
@Override
public Map<String, String> extract(UpdateContextRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("context.name", String.valueOf(request.getContext().getName()));
return params.build();
}
})
.build();
GrpcCallSettings<DeleteContextRequest, Empty> deleteContextTransportSettings =
GrpcCallSettings.<DeleteContextRequest, Empty>newBuilder()
.setMethodDescriptor(deleteContextMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteContextRequest>() {
@Override
public Map<String, String> extract(DeleteContextRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<DeleteAllContextsRequest, Empty> deleteAllContextsTransportSettings =
GrpcCallSettings.<DeleteAllContextsRequest, Empty>newBuilder()
.setMethodDescriptor(deleteAllContextsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteAllContextsRequest>() {
@Override
public Map<String, String> extract(DeleteAllContextsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();

this.listContextsCallable =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest;
import com.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest;
Expand All @@ -38,13 +39,15 @@
import com.google.cloud.dialogflow.v2.ListEntityTypesRequest;
import com.google.cloud.dialogflow.v2.ListEntityTypesResponse;
import com.google.cloud.dialogflow.v2.UpdateEntityTypeRequest;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import com.google.protobuf.Struct;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down Expand Up @@ -224,44 +227,135 @@ protected GrpcEntityTypesStub(
listEntityTypesTransportSettings =
GrpcCallSettings.<ListEntityTypesRequest, ListEntityTypesResponse>newBuilder()
.setMethodDescriptor(listEntityTypesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListEntityTypesRequest>() {
@Override
public Map<String, String> extract(ListEntityTypesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<GetEntityTypeRequest, EntityType> getEntityTypeTransportSettings =
GrpcCallSettings.<GetEntityTypeRequest, EntityType>newBuilder()
.setMethodDescriptor(getEntityTypeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetEntityTypeRequest>() {
@Override
public Map<String, String> extract(GetEntityTypeRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<CreateEntityTypeRequest, EntityType> createEntityTypeTransportSettings =
GrpcCallSettings.<CreateEntityTypeRequest, EntityType>newBuilder()
.setMethodDescriptor(createEntityTypeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateEntityTypeRequest>() {
@Override
public Map<String, String> extract(CreateEntityTypeRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateEntityTypeRequest, EntityType> updateEntityTypeTransportSettings =
GrpcCallSettings.<UpdateEntityTypeRequest, EntityType>newBuilder()
.setMethodDescriptor(updateEntityTypeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateEntityTypeRequest>() {
@Override
public Map<String, String> extract(UpdateEntityTypeRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"entity_type.name", String.valueOf(request.getEntityType().getName()));
return params.build();
}
})
.build();
GrpcCallSettings<DeleteEntityTypeRequest, Empty> deleteEntityTypeTransportSettings =
GrpcCallSettings.<DeleteEntityTypeRequest, Empty>newBuilder()
.setMethodDescriptor(deleteEntityTypeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteEntityTypeRequest>() {
@Override
public Map<String, String> extract(DeleteEntityTypeRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<BatchUpdateEntityTypesRequest, Operation>
batchUpdateEntityTypesTransportSettings =
GrpcCallSettings.<BatchUpdateEntityTypesRequest, Operation>newBuilder()
.setMethodDescriptor(batchUpdateEntityTypesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchUpdateEntityTypesRequest>() {
@Override
public Map<String, String> extract(BatchUpdateEntityTypesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<BatchDeleteEntityTypesRequest, Operation>
batchDeleteEntityTypesTransportSettings =
GrpcCallSettings.<BatchDeleteEntityTypesRequest, Operation>newBuilder()
.setMethodDescriptor(batchDeleteEntityTypesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchDeleteEntityTypesRequest>() {
@Override
public Map<String, String> extract(BatchDeleteEntityTypesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<BatchCreateEntitiesRequest, Operation> batchCreateEntitiesTransportSettings =
GrpcCallSettings.<BatchCreateEntitiesRequest, Operation>newBuilder()
.setMethodDescriptor(batchCreateEntitiesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchCreateEntitiesRequest>() {
@Override
public Map<String, String> extract(BatchCreateEntitiesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<BatchUpdateEntitiesRequest, Operation> batchUpdateEntitiesTransportSettings =
GrpcCallSettings.<BatchUpdateEntitiesRequest, Operation>newBuilder()
.setMethodDescriptor(batchUpdateEntitiesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchUpdateEntitiesRequest>() {
@Override
public Map<String, String> extract(BatchUpdateEntitiesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<BatchDeleteEntitiesRequest, Operation> batchDeleteEntitiesTransportSettings =
GrpcCallSettings.<BatchDeleteEntitiesRequest, Operation>newBuilder()
.setMethodDescriptor(batchDeleteEntitiesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchDeleteEntitiesRequest>() {
@Override
public Map<String, String> extract(BatchDeleteEntitiesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();

this.listEntityTypesCallable =
Expand Down
Loading

0 comments on commit a954d42

Please sign in to comment.