com.google.cloud.dialogflow.v2.ConversationDatasetsGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-google-cloud-dialogflow-v2 Show documentation
Show all versions of grpc-google-cloud-dialogflow-v2 Show documentation
GRPC library for grpc-google-cloud-dialogflow-v2
/*
* Copyright 2023 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.dialogflow.v2;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
*
*
* Conversation datasets.
* Conversation datasets contain raw conversation files and their
* customizable metadata that can be used for model training.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/dialogflow/v2/conversation_dataset.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ConversationDatasetsGrpc {
private ConversationDatasetsGrpc() {}
public static final java.lang.String SERVICE_NAME =
"google.cloud.dialogflow.v2.ConversationDatasets";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest,
com.google.longrunning.Operation>
getCreateConversationDatasetMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateConversationDataset",
requestType = com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest,
com.google.longrunning.Operation>
getCreateConversationDatasetMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest,
com.google.longrunning.Operation>
getCreateConversationDatasetMethod;
if ((getCreateConversationDatasetMethod =
ConversationDatasetsGrpc.getCreateConversationDatasetMethod)
== null) {
synchronized (ConversationDatasetsGrpc.class) {
if ((getCreateConversationDatasetMethod =
ConversationDatasetsGrpc.getCreateConversationDatasetMethod)
== null) {
ConversationDatasetsGrpc.getCreateConversationDatasetMethod =
getCreateConversationDatasetMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "CreateConversationDataset"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new ConversationDatasetsMethodDescriptorSupplier(
"CreateConversationDataset"))
.build();
}
}
}
return getCreateConversationDatasetMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest,
com.google.cloud.dialogflow.v2.ConversationDataset>
getGetConversationDatasetMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetConversationDataset",
requestType = com.google.cloud.dialogflow.v2.GetConversationDatasetRequest.class,
responseType = com.google.cloud.dialogflow.v2.ConversationDataset.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest,
com.google.cloud.dialogflow.v2.ConversationDataset>
getGetConversationDatasetMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest,
com.google.cloud.dialogflow.v2.ConversationDataset>
getGetConversationDatasetMethod;
if ((getGetConversationDatasetMethod = ConversationDatasetsGrpc.getGetConversationDatasetMethod)
== null) {
synchronized (ConversationDatasetsGrpc.class) {
if ((getGetConversationDatasetMethod =
ConversationDatasetsGrpc.getGetConversationDatasetMethod)
== null) {
ConversationDatasetsGrpc.getGetConversationDatasetMethod =
getGetConversationDatasetMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "GetConversationDataset"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.ConversationDataset
.getDefaultInstance()))
.setSchemaDescriptor(
new ConversationDatasetsMethodDescriptorSupplier(
"GetConversationDataset"))
.build();
}
}
}
return getGetConversationDatasetMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest,
com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse>
getListConversationDatasetsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListConversationDatasets",
requestType = com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest.class,
responseType = com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest,
com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse>
getListConversationDatasetsMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest,
com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse>
getListConversationDatasetsMethod;
if ((getListConversationDatasetsMethod =
ConversationDatasetsGrpc.getListConversationDatasetsMethod)
== null) {
synchronized (ConversationDatasetsGrpc.class) {
if ((getListConversationDatasetsMethod =
ConversationDatasetsGrpc.getListConversationDatasetsMethod)
== null) {
ConversationDatasetsGrpc.getListConversationDatasetsMethod =
getListConversationDatasetsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "ListConversationDatasets"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new ConversationDatasetsMethodDescriptorSupplier(
"ListConversationDatasets"))
.build();
}
}
}
return getListConversationDatasetsMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest,
com.google.longrunning.Operation>
getDeleteConversationDatasetMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteConversationDataset",
requestType = com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest,
com.google.longrunning.Operation>
getDeleteConversationDatasetMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest,
com.google.longrunning.Operation>
getDeleteConversationDatasetMethod;
if ((getDeleteConversationDatasetMethod =
ConversationDatasetsGrpc.getDeleteConversationDatasetMethod)
== null) {
synchronized (ConversationDatasetsGrpc.class) {
if ((getDeleteConversationDatasetMethod =
ConversationDatasetsGrpc.getDeleteConversationDatasetMethod)
== null) {
ConversationDatasetsGrpc.getDeleteConversationDatasetMethod =
getDeleteConversationDatasetMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "DeleteConversationDataset"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new ConversationDatasetsMethodDescriptorSupplier(
"DeleteConversationDataset"))
.build();
}
}
}
return getDeleteConversationDatasetMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.ImportConversationDataRequest,
com.google.longrunning.Operation>
getImportConversationDataMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ImportConversationData",
requestType = com.google.cloud.dialogflow.v2.ImportConversationDataRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.ImportConversationDataRequest,
com.google.longrunning.Operation>
getImportConversationDataMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.v2.ImportConversationDataRequest,
com.google.longrunning.Operation>
getImportConversationDataMethod;
if ((getImportConversationDataMethod = ConversationDatasetsGrpc.getImportConversationDataMethod)
== null) {
synchronized (ConversationDatasetsGrpc.class) {
if ((getImportConversationDataMethod =
ConversationDatasetsGrpc.getImportConversationDataMethod)
== null) {
ConversationDatasetsGrpc.getImportConversationDataMethod =
getImportConversationDataMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "ImportConversationData"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.ImportConversationDataRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new ConversationDatasetsMethodDescriptorSupplier(
"ImportConversationData"))
.build();
}
}
}
return getImportConversationDataMethod;
}
/** Creates a new async stub that supports all call types for the service */
public static ConversationDatasetsStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ConversationDatasetsStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConversationDatasetsStub(channel, callOptions);
}
};
return ConversationDatasetsStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ConversationDatasetsBlockingStub newBlockingStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ConversationDatasetsBlockingStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConversationDatasetsBlockingStub(channel, callOptions);
}
};
return ConversationDatasetsBlockingStub.newStub(factory, channel);
}
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
public static ConversationDatasetsFutureStub newFutureStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ConversationDatasetsFutureStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConversationDatasetsFutureStub(channel, callOptions);
}
};
return ConversationDatasetsFutureStub.newStub(factory, channel);
}
/**
*
*
*
* Conversation datasets.
* Conversation datasets contain raw conversation files and their
* customizable metadata that can be used for model training.
*
*/
public interface AsyncService {
/**
*
*
*
* Creates a new conversation dataset.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata]
* - `response`:
* [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset]
*
*/
default void createConversationDataset(
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getCreateConversationDatasetMethod(), responseObserver);
}
/**
*
*
*
* Retrieves the specified conversation dataset.
*
*/
default void getConversationDataset(
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getGetConversationDatasetMethod(), responseObserver);
}
/**
*
*
*
* Returns the list of all conversation datasets in the specified
* project and location.
*
*/
default void listConversationDatasets(
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getListConversationDatasetsMethod(), responseObserver);
}
/**
*
*
*
* Deletes the specified conversation dataset.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata]
* - `response`: An [Empty
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
*
*/
default void deleteConversationDataset(
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getDeleteConversationDatasetMethod(), responseObserver);
}
/**
*
*
*
* Import data into the specified conversation dataset. Note that it
* is not allowed to import data to a conversation dataset that
* already has data in it.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata]
* - `response`:
* [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse]
*
*/
default void importConversationData(
com.google.cloud.dialogflow.v2.ImportConversationDataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getImportConversationDataMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service ConversationDatasets.
*
*
* Conversation datasets.
* Conversation datasets contain raw conversation files and their
* customizable metadata that can be used for model training.
*
*/
public abstract static class ConversationDatasetsImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return ConversationDatasetsGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service ConversationDatasets.
*
*
* Conversation datasets.
* Conversation datasets contain raw conversation files and their
* customizable metadata that can be used for model training.
*
*/
public static final class ConversationDatasetsStub
extends io.grpc.stub.AbstractAsyncStub {
private ConversationDatasetsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ConversationDatasetsStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConversationDatasetsStub(channel, callOptions);
}
/**
*
*
*
* Creates a new conversation dataset.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata]
* - `response`:
* [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset]
*
*/
public void createConversationDataset(
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateConversationDatasetMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Retrieves the specified conversation dataset.
*
*/
public void getConversationDataset(
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetConversationDatasetMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Returns the list of all conversation datasets in the specified
* project and location.
*
*/
public void listConversationDatasets(
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListConversationDatasetsMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Deletes the specified conversation dataset.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata]
* - `response`: An [Empty
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
*
*/
public void deleteConversationDataset(
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteConversationDatasetMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Import data into the specified conversation dataset. Note that it
* is not allowed to import data to a conversation dataset that
* already has data in it.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata]
* - `response`:
* [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse]
*
*/
public void importConversationData(
com.google.cloud.dialogflow.v2.ImportConversationDataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getImportConversationDataMethod(), getCallOptions()),
request,
responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service ConversationDatasets.
*
*
* Conversation datasets.
* Conversation datasets contain raw conversation files and their
* customizable metadata that can be used for model training.
*
*/
public static final class ConversationDatasetsBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ConversationDatasetsBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ConversationDatasetsBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConversationDatasetsBlockingStub(channel, callOptions);
}
/**
*
*
*
* Creates a new conversation dataset.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata]
* - `response`:
* [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset]
*
*/
public com.google.longrunning.Operation createConversationDataset(
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateConversationDatasetMethod(), getCallOptions(), request);
}
/**
*
*
*
* Retrieves the specified conversation dataset.
*
*/
public com.google.cloud.dialogflow.v2.ConversationDataset getConversationDataset(
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetConversationDatasetMethod(), getCallOptions(), request);
}
/**
*
*
*
* Returns the list of all conversation datasets in the specified
* project and location.
*
*/
public com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse listConversationDatasets(
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListConversationDatasetsMethod(), getCallOptions(), request);
}
/**
*
*
*
* Deletes the specified conversation dataset.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata]
* - `response`: An [Empty
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
*
*/
public com.google.longrunning.Operation deleteConversationDataset(
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteConversationDatasetMethod(), getCallOptions(), request);
}
/**
*
*
*
* Import data into the specified conversation dataset. Note that it
* is not allowed to import data to a conversation dataset that
* already has data in it.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata]
* - `response`:
* [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse]
*
*/
public com.google.longrunning.Operation importConversationData(
com.google.cloud.dialogflow.v2.ImportConversationDataRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getImportConversationDataMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service ConversationDatasets.
*
*
* Conversation datasets.
* Conversation datasets contain raw conversation files and their
* customizable metadata that can be used for model training.
*
*/
public static final class ConversationDatasetsFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ConversationDatasetsFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ConversationDatasetsFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConversationDatasetsFutureStub(channel, callOptions);
}
/**
*
*
*
* Creates a new conversation dataset.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [CreateConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata]
* - `response`:
* [ConversationDataset][google.cloud.dialogflow.v2.ConversationDataset]
*
*/
public com.google.common.util.concurrent.ListenableFuture
createConversationDataset(
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateConversationDatasetMethod(), getCallOptions()), request);
}
/**
*
*
*
* Retrieves the specified conversation dataset.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.v2.ConversationDataset>
getConversationDataset(
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetConversationDatasetMethod(), getCallOptions()), request);
}
/**
*
*
*
* Returns the list of all conversation datasets in the specified
* project and location.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse>
listConversationDatasets(
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListConversationDatasetsMethod(), getCallOptions()), request);
}
/**
*
*
*
* Deletes the specified conversation dataset.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [DeleteConversationDatasetOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata]
* - `response`: An [Empty
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
*
*/
public com.google.common.util.concurrent.ListenableFuture
deleteConversationDataset(
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteConversationDatasetMethod(), getCallOptions()), request);
}
/**
*
*
*
* Import data into the specified conversation dataset. Note that it
* is not allowed to import data to a conversation dataset that
* already has data in it.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ImportConversationDataOperationMetadata][google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata]
* - `response`:
* [ImportConversationDataOperationResponse][google.cloud.dialogflow.v2.ImportConversationDataOperationResponse]
*
*/
public com.google.common.util.concurrent.ListenableFuture
importConversationData(
com.google.cloud.dialogflow.v2.ImportConversationDataRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getImportConversationDataMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_CONVERSATION_DATASET = 0;
private static final int METHODID_GET_CONVERSATION_DATASET = 1;
private static final int METHODID_LIST_CONVERSATION_DATASETS = 2;
private static final int METHODID_DELETE_CONVERSATION_DATASET = 3;
private static final int METHODID_IMPORT_CONVERSATION_DATA = 4;
private static final class MethodHandlers
implements io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_CREATE_CONVERSATION_DATASET:
serviceImpl.createConversationDataset(
(com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_CONVERSATION_DATASET:
serviceImpl.getConversationDataset(
(com.google.cloud.dialogflow.v2.GetConversationDatasetRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_LIST_CONVERSATION_DATASETS:
serviceImpl.listConversationDatasets(
(com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse>)
responseObserver);
break;
case METHODID_DELETE_CONVERSATION_DATASET:
serviceImpl.deleteConversationDataset(
(com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_IMPORT_CONVERSATION_DATA:
serviceImpl.importConversationData(
(com.google.cloud.dialogflow.v2.ImportConversationDataRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateConversationDatasetMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.CreateConversationDatasetRequest,
com.google.longrunning.Operation>(
service, METHODID_CREATE_CONVERSATION_DATASET)))
.addMethod(
getGetConversationDatasetMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.GetConversationDatasetRequest,
com.google.cloud.dialogflow.v2.ConversationDataset>(
service, METHODID_GET_CONVERSATION_DATASET)))
.addMethod(
getListConversationDatasetsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.ListConversationDatasetsRequest,
com.google.cloud.dialogflow.v2.ListConversationDatasetsResponse>(
service, METHODID_LIST_CONVERSATION_DATASETS)))
.addMethod(
getDeleteConversationDatasetMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest,
com.google.longrunning.Operation>(
service, METHODID_DELETE_CONVERSATION_DATASET)))
.addMethod(
getImportConversationDataMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.ImportConversationDataRequest,
com.google.longrunning.Operation>(service, METHODID_IMPORT_CONVERSATION_DATA)))
.build();
}
private abstract static class ConversationDatasetsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ConversationDatasetsBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.dialogflow.v2.ConversationDatasetProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ConversationDatasets");
}
}
private static final class ConversationDatasetsFileDescriptorSupplier
extends ConversationDatasetsBaseDescriptorSupplier {
ConversationDatasetsFileDescriptorSupplier() {}
}
private static final class ConversationDatasetsMethodDescriptorSupplier
extends ConversationDatasetsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
ConversationDatasetsMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (ConversationDatasetsGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ConversationDatasetsFileDescriptorSupplier())
.addMethod(getCreateConversationDatasetMethod())
.addMethod(getGetConversationDatasetMethod())
.addMethod(getListConversationDatasetsMethod())
.addMethod(getDeleteConversationDatasetMethod())
.addMethod(getImportConversationDataMethod())
.build();
}
}
}
return result;
}
}