Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.dialogflow.cx.v3beta1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
*
*
* Service for managing [Intents][google.cloud.dialogflow.cx.v3beta1.Intent].
*
* Creates an intent in the specified agent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Updates the specified intent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Deletes the specified intent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Imports the specified intents into the agent.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
* - `response`:
* [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
*
* Exports the selected intents.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
* - `response`:
* [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
*
*/
default void exportIntents(
com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getExportIntentsMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Intents.
*
*
* Service for managing [Intents][google.cloud.dialogflow.cx.v3beta1.Intent].
*
*/
public abstract static class IntentsImplBase implements io.grpc.BindableService, AsyncService {
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return IntentsGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Intents.
*
*
* Service for managing [Intents][google.cloud.dialogflow.cx.v3beta1.Intent].
*
*/
public static final class IntentsStub extends io.grpc.stub.AbstractAsyncStub {
private IntentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IntentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IntentsStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all intents in the specified agent.
*
* Creates an intent in the specified agent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Updates the specified intent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Deletes the specified intent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Imports the specified intents into the agent.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
* - `response`:
* [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
*
* Exports the selected intents.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
* - `response`:
* [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
*
*/
public void exportIntents(
com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getExportIntentsMethod(), getCallOptions()),
request,
responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Intents.
*
*
* Service for managing [Intents][google.cloud.dialogflow.cx.v3beta1.Intent].
*
*/
public static final class IntentsBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private IntentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IntentsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IntentsBlockingStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all intents in the specified agent.
*
* Creates an intent in the specified agent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Updates the specified intent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Deletes the specified intent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Imports the specified intents into the agent.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
* - `response`:
* [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
*
* Exports the selected intents.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
* - `response`:
* [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
*
*/
public com.google.longrunning.Operation exportIntents(
com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getExportIntentsMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Intents.
*
*
* Service for managing [Intents][google.cloud.dialogflow.cx.v3beta1.Intent].
*
*/
public static final class IntentsFutureStub
extends io.grpc.stub.AbstractFutureStub {
private IntentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IntentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IntentsFutureStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all intents in the specified agent.
*
* Creates an intent in the specified agent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Updates the specified intent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Deletes the specified intent.
* Note: You should always train a flow prior to sending it queries. See the
* [training
* documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
*
* Imports the specified intents into the agent.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ImportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata]
* - `response`:
* [ImportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse]
*
* Exports the selected intents.
* This method is a [long-running
* operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
* The returned `Operation` type has the following method-specific fields:
* - `metadata`:
* [ExportIntentsMetadata][google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata]
* - `response`:
* [ExportIntentsResponse][google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse]
*
*/
public com.google.common.util.concurrent.ListenableFuture
exportIntents(com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getExportIntentsMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_INTENTS = 0;
private static final int METHODID_GET_INTENT = 1;
private static final int METHODID_CREATE_INTENT = 2;
private static final int METHODID_UPDATE_INTENT = 3;
private static final int METHODID_DELETE_INTENT = 4;
private static final int METHODID_IMPORT_INTENTS = 5;
private static final int METHODID_EXPORT_INTENTS = 6;
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_LIST_INTENTS:
serviceImpl.listIntents(
(com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse>)
responseObserver);
break;
case METHODID_GET_INTENT:
serviceImpl.getIntent(
(com.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_CREATE_INTENT:
serviceImpl.createIntent(
(com.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_UPDATE_INTENT:
serviceImpl.updateIntent(
(com.google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_DELETE_INTENT:
serviceImpl.deleteIntent(
(com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_IMPORT_INTENTS:
serviceImpl.importIntents(
(com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXPORT_INTENTS:
serviceImpl.exportIntents(
(com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest) 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(
getListIntentsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest,
com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse>(
service, METHODID_LIST_INTENTS)))
.addMethod(
getGetIntentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Intent>(service, METHODID_GET_INTENT)))
.addMethod(
getCreateIntentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Intent>(
service, METHODID_CREATE_INTENT)))
.addMethod(
getUpdateIntentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Intent>(
service, METHODID_UPDATE_INTENT)))
.addMethod(
getDeleteIntentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest,
com.google.protobuf.Empty>(service, METHODID_DELETE_INTENT)))
.addMethod(
getImportIntentsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest,
com.google.longrunning.Operation>(service, METHODID_IMPORT_INTENTS)))
.addMethod(
getExportIntentsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest,
com.google.longrunning.Operation>(service, METHODID_EXPORT_INTENTS)))
.build();
}
private abstract static class IntentsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
IntentsBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.IntentProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Intents");
}
}
private static final class IntentsFileDescriptorSupplier extends IntentsBaseDescriptorSupplier {
IntentsFileDescriptorSupplier() {}
}
private static final class IntentsMethodDescriptorSupplier extends IntentsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
IntentsMethodDescriptorSupplier(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 (IntentsGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new IntentsFileDescriptorSupplier())
.addMethod(getListIntentsMethod())
.addMethod(getGetIntentMethod())
.addMethod(getCreateIntentMethod())
.addMethod(getUpdateIntentMethod())
.addMethod(getDeleteIntentMethod())
.addMethod(getImportIntentsMethod())
.addMethod(getExportIntentsMethod())
.build();
}
}
}
return result;
}
}