Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit b29dfea

Browse files
feat: Expose supported languages of the agent (#205)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/d32ae83f-85b1-4566-9db8-fbb972c5f42b/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) PiperOrigin-RevId: 370928139 Source-Link: googleapis/googleapis@0fa726c PiperOrigin-RevId: 370860251 Source-Link: googleapis/googleapis@ef119e7 feat: add export / import flow API docs: Update docs on Pages, Session, Version, etc.
1 parent 9c00552 commit b29dfea

File tree

167 files changed

+16113
-2328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+16113
-2328
lines changed

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,9 @@ public final UnaryCallable<DeleteAgentRequest, Empty> deleteAgentCallable() {
661661
* ExportAgentRequest.newBuilder()
662662
* .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
663663
* .setAgentUri("agentUri1469149223")
664+
* .setEnvironment(
665+
* EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
666+
* .toString())
664667
* .build();
665668
* ExportAgentResponse response = agentsClient.exportAgentAsync(request).get();
666669
* }
@@ -686,6 +689,9 @@ public final OperationFuture<ExportAgentResponse, Struct> exportAgentAsync(
686689
* ExportAgentRequest.newBuilder()
687690
* .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
688691
* .setAgentUri("agentUri1469149223")
692+
* .setEnvironment(
693+
* EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
694+
* .toString())
689695
* .build();
690696
* OperationFuture<ExportAgentResponse, Struct> future =
691697
* agentsClient.exportAgentOperationCallable().futureCall(request);
@@ -711,6 +717,9 @@ public final OperationFuture<ExportAgentResponse, Struct> exportAgentAsync(
711717
* ExportAgentRequest.newBuilder()
712718
* .setName(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
713719
* .setAgentUri("agentUri1469149223")
720+
* .setEnvironment(
721+
* EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]")
722+
* .toString())
714723
* .build();
715724
* ApiFuture<Operation> future = agentsClient.exportAgentCallable().futureCall(request);
716725
* // Do something.

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,161 @@ public final FlowValidationResult getFlowValidationResult(
934934
return stub.getFlowValidationResultCallable();
935935
}
936936

937+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
938+
/**
939+
* Imports the specified flow to the specified agent from a binary file.
940+
*
941+
* <p>Sample code:
942+
*
943+
* <pre>{@code
944+
* try (FlowsClient flowsClient = FlowsClient.create()) {
945+
* ImportFlowRequest request =
946+
* ImportFlowRequest.newBuilder()
947+
* .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
948+
* .build();
949+
* ImportFlowResponse response = flowsClient.importFlowAsync(request).get();
950+
* }
951+
* }</pre>
952+
*
953+
* @param request The request object containing all of the parameters for the API call.
954+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
955+
*/
956+
public final OperationFuture<ImportFlowResponse, Struct> importFlowAsync(
957+
ImportFlowRequest request) {
958+
return importFlowOperationCallable().futureCall(request);
959+
}
960+
961+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
962+
/**
963+
* Imports the specified flow to the specified agent from a binary file.
964+
*
965+
* <p>Sample code:
966+
*
967+
* <pre>{@code
968+
* try (FlowsClient flowsClient = FlowsClient.create()) {
969+
* ImportFlowRequest request =
970+
* ImportFlowRequest.newBuilder()
971+
* .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
972+
* .build();
973+
* OperationFuture<ImportFlowResponse, Struct> future =
974+
* flowsClient.importFlowOperationCallable().futureCall(request);
975+
* // Do something.
976+
* ImportFlowResponse response = future.get();
977+
* }
978+
* }</pre>
979+
*/
980+
public final OperationCallable<ImportFlowRequest, ImportFlowResponse, Struct>
981+
importFlowOperationCallable() {
982+
return stub.importFlowOperationCallable();
983+
}
984+
985+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
986+
/**
987+
* Imports the specified flow to the specified agent from a binary file.
988+
*
989+
* <p>Sample code:
990+
*
991+
* <pre>{@code
992+
* try (FlowsClient flowsClient = FlowsClient.create()) {
993+
* ImportFlowRequest request =
994+
* ImportFlowRequest.newBuilder()
995+
* .setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
996+
* .build();
997+
* ApiFuture<Operation> future = flowsClient.importFlowCallable().futureCall(request);
998+
* // Do something.
999+
* Operation response = future.get();
1000+
* }
1001+
* }</pre>
1002+
*/
1003+
public final UnaryCallable<ImportFlowRequest, Operation> importFlowCallable() {
1004+
return stub.importFlowCallable();
1005+
}
1006+
1007+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1008+
/**
1009+
* Exports the specified flow to a binary file.
1010+
*
1011+
* <p>Note that resources (e.g. intents, entities, webhooks) that the flow references will also be
1012+
* exported.
1013+
*
1014+
* <p>Sample code:
1015+
*
1016+
* <pre>{@code
1017+
* try (FlowsClient flowsClient = FlowsClient.create()) {
1018+
* ExportFlowRequest request =
1019+
* ExportFlowRequest.newBuilder()
1020+
* .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
1021+
* .setFlowUri("flowUri-765815458")
1022+
* .setIncludeReferencedFlows(true)
1023+
* .build();
1024+
* ExportFlowResponse response = flowsClient.exportFlowAsync(request).get();
1025+
* }
1026+
* }</pre>
1027+
*
1028+
* @param request The request object containing all of the parameters for the API call.
1029+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1030+
*/
1031+
public final OperationFuture<ExportFlowResponse, Struct> exportFlowAsync(
1032+
ExportFlowRequest request) {
1033+
return exportFlowOperationCallable().futureCall(request);
1034+
}
1035+
1036+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1037+
/**
1038+
* Exports the specified flow to a binary file.
1039+
*
1040+
* <p>Note that resources (e.g. intents, entities, webhooks) that the flow references will also be
1041+
* exported.
1042+
*
1043+
* <p>Sample code:
1044+
*
1045+
* <pre>{@code
1046+
* try (FlowsClient flowsClient = FlowsClient.create()) {
1047+
* ExportFlowRequest request =
1048+
* ExportFlowRequest.newBuilder()
1049+
* .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
1050+
* .setFlowUri("flowUri-765815458")
1051+
* .setIncludeReferencedFlows(true)
1052+
* .build();
1053+
* OperationFuture<ExportFlowResponse, Struct> future =
1054+
* flowsClient.exportFlowOperationCallable().futureCall(request);
1055+
* // Do something.
1056+
* ExportFlowResponse response = future.get();
1057+
* }
1058+
* }</pre>
1059+
*/
1060+
public final OperationCallable<ExportFlowRequest, ExportFlowResponse, Struct>
1061+
exportFlowOperationCallable() {
1062+
return stub.exportFlowOperationCallable();
1063+
}
1064+
1065+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1066+
/**
1067+
* Exports the specified flow to a binary file.
1068+
*
1069+
* <p>Note that resources (e.g. intents, entities, webhooks) that the flow references will also be
1070+
* exported.
1071+
*
1072+
* <p>Sample code:
1073+
*
1074+
* <pre>{@code
1075+
* try (FlowsClient flowsClient = FlowsClient.create()) {
1076+
* ExportFlowRequest request =
1077+
* ExportFlowRequest.newBuilder()
1078+
* .setName(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
1079+
* .setFlowUri("flowUri-765815458")
1080+
* .setIncludeReferencedFlows(true)
1081+
* .build();
1082+
* ApiFuture<Operation> future = flowsClient.exportFlowCallable().futureCall(request);
1083+
* // Do something.
1084+
* Operation response = future.get();
1085+
* }
1086+
* }</pre>
1087+
*/
1088+
public final UnaryCallable<ExportFlowRequest, Operation> exportFlowCallable() {
1089+
return stub.exportFlowCallable();
1090+
}
1091+
9371092
@Override
9381093
public final void close() {
9391094
stub.close();

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsSettings.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,28 @@ public UnaryCallSettings<ValidateFlowRequest, FlowValidationResult> validateFlow
119119
return ((FlowsStubSettings) getStubSettings()).getFlowValidationResultSettings();
120120
}
121121

122+
/** Returns the object with the settings used for calls to importFlow. */
123+
public UnaryCallSettings<ImportFlowRequest, Operation> importFlowSettings() {
124+
return ((FlowsStubSettings) getStubSettings()).importFlowSettings();
125+
}
126+
127+
/** Returns the object with the settings used for calls to importFlow. */
128+
public OperationCallSettings<ImportFlowRequest, ImportFlowResponse, Struct>
129+
importFlowOperationSettings() {
130+
return ((FlowsStubSettings) getStubSettings()).importFlowOperationSettings();
131+
}
132+
133+
/** Returns the object with the settings used for calls to exportFlow. */
134+
public UnaryCallSettings<ExportFlowRequest, Operation> exportFlowSettings() {
135+
return ((FlowsStubSettings) getStubSettings()).exportFlowSettings();
136+
}
137+
138+
/** Returns the object with the settings used for calls to exportFlow. */
139+
public OperationCallSettings<ExportFlowRequest, ExportFlowResponse, Struct>
140+
exportFlowOperationSettings() {
141+
return ((FlowsStubSettings) getStubSettings()).exportFlowOperationSettings();
142+
}
143+
122144
public static final FlowsSettings create(FlowsStubSettings stub) throws IOException {
123145
return new FlowsSettings.Builder(stub.toBuilder()).build();
124146
}
@@ -265,6 +287,28 @@ public UnaryCallSettings.Builder<TrainFlowRequest, Operation> trainFlowSettings(
265287
return getStubSettingsBuilder().getFlowValidationResultSettings();
266288
}
267289

290+
/** Returns the builder for the settings used for calls to importFlow. */
291+
public UnaryCallSettings.Builder<ImportFlowRequest, Operation> importFlowSettings() {
292+
return getStubSettingsBuilder().importFlowSettings();
293+
}
294+
295+
/** Returns the builder for the settings used for calls to importFlow. */
296+
public OperationCallSettings.Builder<ImportFlowRequest, ImportFlowResponse, Struct>
297+
importFlowOperationSettings() {
298+
return getStubSettingsBuilder().importFlowOperationSettings();
299+
}
300+
301+
/** Returns the builder for the settings used for calls to exportFlow. */
302+
public UnaryCallSettings.Builder<ExportFlowRequest, Operation> exportFlowSettings() {
303+
return getStubSettingsBuilder().exportFlowSettings();
304+
}
305+
306+
/** Returns the builder for the settings used for calls to exportFlow. */
307+
public OperationCallSettings.Builder<ExportFlowRequest, ExportFlowResponse, Struct>
308+
exportFlowOperationSettings() {
309+
return getStubSettingsBuilder().exportFlowOperationSettings();
310+
}
311+
268312
@Override
269313
public FlowsSettings build() throws IOException {
270314
return new FlowsSettings(this);

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ public final UnaryCallable<DeleteVersionRequest, Empty> deleteVersionCallable()
723723

724724
// AUTO-GENERATED DOCUMENTATION AND METHOD.
725725
/**
726-
* Loads a specified version to draft version.
726+
* Loads resources in the specified version to the draft flow.
727727
*
728728
* <p>Sample code:
729729
*
@@ -736,7 +736,7 @@ public final UnaryCallable<DeleteVersionRequest, Empty> deleteVersionCallable()
736736
* }</pre>
737737
*
738738
* @param name Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to
739-
* draft version. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
739+
* draft flow. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
740740
* ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;/versions/&lt;Version ID&gt;`.
741741
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
742742
*/
@@ -748,7 +748,7 @@ public final OperationFuture<Empty, Struct> loadVersionAsync(VersionName name) {
748748

749749
// AUTO-GENERATED DOCUMENTATION AND METHOD.
750750
/**
751-
* Loads a specified version to draft version.
751+
* Loads resources in the specified version to the draft flow.
752752
*
753753
* <p>Sample code:
754754
*
@@ -761,7 +761,7 @@ public final OperationFuture<Empty, Struct> loadVersionAsync(VersionName name) {
761761
* }</pre>
762762
*
763763
* @param name Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to
764-
* draft version. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
764+
* draft flow. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
765765
* ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;/versions/&lt;Version ID&gt;`.
766766
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
767767
*/
@@ -772,7 +772,7 @@ public final OperationFuture<Empty, Struct> loadVersionAsync(String name) {
772772

773773
// AUTO-GENERATED DOCUMENTATION AND METHOD.
774774
/**
775-
* Loads a specified version to draft version.
775+
* Loads resources in the specified version to the draft flow.
776776
*
777777
* <p>Sample code:
778778
*
@@ -798,7 +798,7 @@ public final OperationFuture<Empty, Struct> loadVersionAsync(LoadVersionRequest
798798

799799
// AUTO-GENERATED DOCUMENTATION AND METHOD.
800800
/**
801-
* Loads a specified version to draft version.
801+
* Loads resources in the specified version to the draft flow.
802802
*
803803
* <p>Sample code:
804804
*
@@ -824,7 +824,7 @@ public final OperationCallable<LoadVersionRequest, Empty, Struct> loadVersionOpe
824824

825825
// AUTO-GENERATED DOCUMENTATION AND METHOD.
826826
/**
827-
* Loads a specified version to draft version.
827+
* Loads resources in the specified version to the draft flow.
828828
*
829829
* <p>Sample code:
830830
*

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,18 @@
133133
"DeleteFlow": {
134134
"methods": ["deleteFlow", "deleteFlow", "deleteFlow", "deleteFlowCallable"]
135135
},
136+
"ExportFlow": {
137+
"methods": ["exportFlowAsync", "exportFlowOperationCallable", "exportFlowCallable"]
138+
},
136139
"GetFlow": {
137140
"methods": ["getFlow", "getFlow", "getFlow", "getFlowCallable"]
138141
},
139142
"GetFlowValidationResult": {
140143
"methods": ["getFlowValidationResult", "getFlowValidationResult", "getFlowValidationResult", "getFlowValidationResultCallable"]
141144
},
145+
"ImportFlow": {
146+
"methods": ["importFlowAsync", "importFlowOperationCallable", "importFlowCallable"]
147+
},
142148
"ListFlows": {
143149
"methods": ["listFlows", "listFlows", "listFlows", "listFlowsPagedCallable", "listFlowsCallable"]
144150
},

google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/FlowsStub.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@
2323
import com.google.api.gax.rpc.UnaryCallable;
2424
import com.google.cloud.dialogflow.cx.v3.CreateFlowRequest;
2525
import com.google.cloud.dialogflow.cx.v3.DeleteFlowRequest;
26+
import com.google.cloud.dialogflow.cx.v3.ExportFlowRequest;
27+
import com.google.cloud.dialogflow.cx.v3.ExportFlowResponse;
2628
import com.google.cloud.dialogflow.cx.v3.Flow;
2729
import com.google.cloud.dialogflow.cx.v3.FlowValidationResult;
2830
import com.google.cloud.dialogflow.cx.v3.GetFlowRequest;
2931
import com.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest;
32+
import com.google.cloud.dialogflow.cx.v3.ImportFlowRequest;
33+
import com.google.cloud.dialogflow.cx.v3.ImportFlowResponse;
3034
import com.google.cloud.dialogflow.cx.v3.ListFlowsRequest;
3135
import com.google.cloud.dialogflow.cx.v3.ListFlowsResponse;
3236
import com.google.cloud.dialogflow.cx.v3.TrainFlowRequest;
@@ -92,6 +96,24 @@ public UnaryCallable<ValidateFlowRequest, FlowValidationResult> validateFlowCall
9296
throw new UnsupportedOperationException("Not implemented: getFlowValidationResultCallable()");
9397
}
9498

99+
public OperationCallable<ImportFlowRequest, ImportFlowResponse, Struct>
100+
importFlowOperationCallable() {
101+
throw new UnsupportedOperationException("Not implemented: importFlowOperationCallable()");
102+
}
103+
104+
public UnaryCallable<ImportFlowRequest, Operation> importFlowCallable() {
105+
throw new UnsupportedOperationException("Not implemented: importFlowCallable()");
106+
}
107+
108+
public OperationCallable<ExportFlowRequest, ExportFlowResponse, Struct>
109+
exportFlowOperationCallable() {
110+
throw new UnsupportedOperationException("Not implemented: exportFlowOperationCallable()");
111+
}
112+
113+
public UnaryCallable<ExportFlowRequest, Operation> exportFlowCallable() {
114+
throw new UnsupportedOperationException("Not implemented: exportFlowCallable()");
115+
}
116+
95117
@Override
96118
public abstract void close();
97119
}

0 commit comments

Comments
 (0)