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
* [Environments][google.cloud.dialogflow.cx.v3beta1.Environment].
*
* Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in
* the specified [Agent][google.cloud.dialogflow.cx.v3beta1.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`: An empty [Struct
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
* - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
*
* Updates the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`: An empty [Struct
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
* - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
*
* Kicks off a continuous test under the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`:
* [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata]
* - `response`:
* [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse]
*
* Deploys a flow to the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`:
* [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata]
* - `response`:
* [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse]
*
*/
default void deployFlow(
com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeployFlowMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Environments.
*
*
* Service for managing
* [Environments][google.cloud.dialogflow.cx.v3beta1.Environment].
*
*/
public abstract static class EnvironmentsImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return EnvironmentsGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Environments.
*
*
* Service for managing
* [Environments][google.cloud.dialogflow.cx.v3beta1.Environment].
*
*/
public static final class EnvironmentsStub
extends io.grpc.stub.AbstractAsyncStub {
private EnvironmentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EnvironmentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EnvironmentsStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all environments in the specified
* [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
*
* Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in
* the specified [Agent][google.cloud.dialogflow.cx.v3beta1.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`: An empty [Struct
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
* - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
*
* Updates the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`: An empty [Struct
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
* - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
*
* Kicks off a continuous test under the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`:
* [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata]
* - `response`:
* [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse]
*
* Deploys a flow to the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`:
* [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata]
* - `response`:
* [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse]
*
*/
public void deployFlow(
com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeployFlowMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Environments.
*
*
* Service for managing
* [Environments][google.cloud.dialogflow.cx.v3beta1.Environment].
*
*/
public static final class EnvironmentsBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private EnvironmentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EnvironmentsBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EnvironmentsBlockingStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all environments in the specified
* [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
*
* Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in
* the specified [Agent][google.cloud.dialogflow.cx.v3beta1.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`: An empty [Struct
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
* - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
*
* Updates the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`: An empty [Struct
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
* - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
*
* Kicks off a continuous test under the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`:
* [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata]
* - `response`:
* [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse]
*
* Deploys a flow to the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`:
* [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata]
* - `response`:
* [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse]
*
*/
public com.google.longrunning.Operation deployFlow(
com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeployFlowMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Environments.
*
*
* Service for managing
* [Environments][google.cloud.dialogflow.cx.v3beta1.Environment].
*
*/
public static final class EnvironmentsFutureStub
extends io.grpc.stub.AbstractFutureStub {
private EnvironmentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EnvironmentsFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EnvironmentsFutureStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all environments in the specified
* [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
*
* Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in
* the specified [Agent][google.cloud.dialogflow.cx.v3beta1.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`: An empty [Struct
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
* - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
*
* Updates the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`: An empty [Struct
* message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
* - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
*
* Kicks off a continuous test under the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`:
* [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata]
* - `response`:
* [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse]
*
* Deploys a flow to the specified
* [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
* 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`:
* [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata]
* - `response`:
* [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse]
*
*/
public com.google.common.util.concurrent.ListenableFuture
deployFlow(com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeployFlowMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_ENVIRONMENTS = 0;
private static final int METHODID_GET_ENVIRONMENT = 1;
private static final int METHODID_CREATE_ENVIRONMENT = 2;
private static final int METHODID_UPDATE_ENVIRONMENT = 3;
private static final int METHODID_DELETE_ENVIRONMENT = 4;
private static final int METHODID_LOOKUP_ENVIRONMENT_HISTORY = 5;
private static final int METHODID_RUN_CONTINUOUS_TEST = 6;
private static final int METHODID_LIST_CONTINUOUS_TEST_RESULTS = 7;
private static final int METHODID_DEPLOY_FLOW = 8;
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_ENVIRONMENTS:
serviceImpl.listEnvironments(
(com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse>)
responseObserver);
break;
case METHODID_GET_ENVIRONMENT:
serviceImpl.getEnvironment(
(com.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_CREATE_ENVIRONMENT:
serviceImpl.createEnvironment(
(com.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_ENVIRONMENT:
serviceImpl.updateEnvironment(
(com.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_ENVIRONMENT:
serviceImpl.deleteEnvironment(
(com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LOOKUP_ENVIRONMENT_HISTORY:
serviceImpl.lookupEnvironmentHistory(
(com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest) request,
(io.grpc.stub.StreamObserver<
com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse>)
responseObserver);
break;
case METHODID_RUN_CONTINUOUS_TEST:
serviceImpl.runContinuousTest(
(com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST_CONTINUOUS_TEST_RESULTS:
serviceImpl.listContinuousTestResults(
(com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse>)
responseObserver);
break;
case METHODID_DEPLOY_FLOW:
serviceImpl.deployFlow(
(com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) 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(
getListEnvironmentsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest,
com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse>(
service, METHODID_LIST_ENVIRONMENTS)))
.addMethod(
getGetEnvironmentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Environment>(
service, METHODID_GET_ENVIRONMENT)))
.addMethod(
getCreateEnvironmentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest,
com.google.longrunning.Operation>(service, METHODID_CREATE_ENVIRONMENT)))
.addMethod(
getUpdateEnvironmentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest,
com.google.longrunning.Operation>(service, METHODID_UPDATE_ENVIRONMENT)))
.addMethod(
getDeleteEnvironmentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest,
com.google.protobuf.Empty>(service, METHODID_DELETE_ENVIRONMENT)))
.addMethod(
getLookupEnvironmentHistoryMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest,
com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse>(
service, METHODID_LOOKUP_ENVIRONMENT_HISTORY)))
.addMethod(
getRunContinuousTestMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest,
com.google.longrunning.Operation>(service, METHODID_RUN_CONTINUOUS_TEST)))
.addMethod(
getListContinuousTestResultsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest,
com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse>(
service, METHODID_LIST_CONTINUOUS_TEST_RESULTS)))
.addMethod(
getDeployFlowMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest,
com.google.longrunning.Operation>(service, METHODID_DEPLOY_FLOW)))
.build();
}
private abstract static class EnvironmentsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
EnvironmentsBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.dialogflow.cx.v3beta1.EnvironmentProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Environments");
}
}
private static final class EnvironmentsFileDescriptorSupplier
extends EnvironmentsBaseDescriptorSupplier {
EnvironmentsFileDescriptorSupplier() {}
}
private static final class EnvironmentsMethodDescriptorSupplier
extends EnvironmentsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
EnvironmentsMethodDescriptorSupplier(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 (EnvironmentsGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new EnvironmentsFileDescriptorSupplier())
.addMethod(getListEnvironmentsMethod())
.addMethod(getGetEnvironmentMethod())
.addMethod(getCreateEnvironmentMethod())
.addMethod(getUpdateEnvironmentMethod())
.addMethod(getDeleteEnvironmentMethod())
.addMethod(getLookupEnvironmentHistoryMethod())
.addMethod(getRunContinuousTestMethod())
.addMethod(getListContinuousTestResultsMethod())
.addMethod(getDeployFlowMethod())
.build();
}
}
}
return result;
}
}