Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [dialogflow-cx] added GitIntegrationSettings to the Agent #9631

Merged
merged 8 commits into from
Jul 11, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ public final UnaryCallable<DeleteAgentRequest, Empty> deleteAgentCallable() {
* .setEnvironment(
* EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
* .toString())
* .setGitDestination(ExportAgentRequest.GitDestination.newBuilder().build())
* .setIncludeBigqueryExportSettings(true)
* .build();
* ExportAgentResponse response = agentsClient.exportAgentAsync(request).get();
Expand Down Expand Up @@ -882,6 +883,7 @@ public final OperationFuture<ExportAgentResponse, Struct> exportAgentAsync(
* .setEnvironment(
* EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
* .toString())
* .setGitDestination(ExportAgentRequest.GitDestination.newBuilder().build())
* .setIncludeBigqueryExportSettings(true)
* .build();
* OperationFuture<ExportAgentResponse, Struct> future =
Expand Down Expand Up @@ -924,6 +926,7 @@ public final OperationFuture<ExportAgentResponse, Struct> exportAgentAsync(
* .setEnvironment(
* EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
* .toString())
* .setGitDestination(ExportAgentRequest.GitDestination.newBuilder().build())
* .setIncludeBigqueryExportSettings(true)
* .build();
* ApiFuture<Operation> future = agentsClient.exportAgentCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,8 @@ public final UnaryCallable<ExportTestCasesRequest, Operation> exportTestCasesCal

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100 results are kept for
* each test case.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1374,7 +1375,8 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults(TestCaseName p

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100 results are kept for
* each test case.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1407,7 +1409,8 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults(String parent)

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100 results are kept for
* each test case.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1442,7 +1445,8 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults(

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100 results are kept for
* each test case.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1477,7 +1481,8 @@ public final ListTestCaseResultsPagedResponse listTestCaseResults(

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100 results are kept for
* each test case.
*
* <p>Sample code:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public void getAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -266,6 +267,7 @@ public void getAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -326,6 +328,7 @@ public void createAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -388,6 +391,7 @@ public void createAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);
Expand Down Expand Up @@ -450,6 +454,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);
Expand All @@ -472,6 +477,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
Expand Down Expand Up @@ -520,6 +526,7 @@ public void updateAgentExceptionTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
Expand Down Expand Up @@ -628,6 +635,7 @@ public void exportAgentTest() throws Exception {
.setEnvironment(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
.toString())
.setGitDestination(ExportAgentRequest.GitDestination.newBuilder().build())
.setIncludeBigqueryExportSettings(true)
.build();

Expand Down Expand Up @@ -664,6 +672,7 @@ public void exportAgentExceptionTest() throws Exception {
.setEnvironment(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
.toString())
.setGitDestination(ExportAgentRequest.GitDestination.newBuilder().build())
.setIncludeBigqueryExportSettings(true)
.build();
client.exportAgentAsync(request).get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public void getAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);
Expand Down Expand Up @@ -256,6 +257,7 @@ public void getAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);
Expand Down Expand Up @@ -310,6 +312,7 @@ public void createAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);
Expand Down Expand Up @@ -367,6 +370,7 @@ public void createAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);
Expand Down Expand Up @@ -424,6 +428,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setGitIntegrationSettings(Agent.GitIntegrationSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);
Expand Down Expand Up @@ -547,6 +552,7 @@ public void exportAgentTest() throws Exception {
.setEnvironment(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
.toString())
.setGitDestination(ExportAgentRequest.GitDestination.newBuilder().build())
.setIncludeBigqueryExportSettings(true)
.build();

Expand All @@ -561,6 +567,7 @@ public void exportAgentTest() throws Exception {
Assert.assertEquals(request.getAgentUri(), actualRequest.getAgentUri());
Assert.assertEquals(request.getDataFormat(), actualRequest.getDataFormat());
Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment());
Assert.assertEquals(request.getGitDestination(), actualRequest.getGitDestination());
Assert.assertEquals(
request.getIncludeBigqueryExportSettings(),
actualRequest.getIncludeBigqueryExportSettings());
Expand All @@ -583,6 +590,7 @@ public void exportAgentExceptionTest() throws Exception {
.setEnvironment(
EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
.toString())
.setGitDestination(ExportAgentRequest.GitDestination.newBuilder().build())
.setIncludeBigqueryExportSettings(true)
.build();
client.exportAgentAsync(request).get();
Expand Down Expand Up @@ -619,6 +627,7 @@ public void restoreAgentTest() throws Exception {
Assert.assertEquals(request.getName(), actualRequest.getName());
Assert.assertEquals(request.getAgentUri(), actualRequest.getAgentUri());
Assert.assertEquals(request.getAgentContent(), actualRequest.getAgentContent());
Assert.assertEquals(request.getGitSource(), actualRequest.getGitSource());
Assert.assertEquals(request.getRestoreOption(), actualRequest.getRestoreOption());
Assert.assertTrue(
channelProvider.isHeaderSent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,8 @@ default void exportTestCases(
*
*
* <pre>
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100
* results are kept for each test case.
* </pre>
*/
default void listTestCaseResults(
Expand Down Expand Up @@ -1067,7 +1068,8 @@ public void exportTestCases(
*
*
* <pre>
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100
* results are kept for each test case.
* </pre>
*/
public void listTestCaseResults(
Expand Down Expand Up @@ -1283,7 +1285,8 @@ public com.google.longrunning.Operation exportTestCases(
*
*
* <pre>
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100
* results are kept for each test case.
* </pre>
*/
public com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsResponse listTestCaseResults(
Expand Down Expand Up @@ -1496,7 +1499,8 @@ protected TestCasesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions
*
*
* <pre>
* Fetches a list of results for a given test case.
* Fetches the list of run results for the given test case. A maximum of 100
* results are kept for each test case.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<
Expand Down
Loading