@@ -619,6 +619,69 @@ public virtual Agent GetAgent(
619
619
} ,
620
620
callSettings ) ;
621
621
622
+ /// <summary>
623
+ /// Retrieves the specified agent.
624
+ /// </summary>
625
+ /// <param name="parent">
626
+ /// Required. The project that the agent to fetch is associated with.
627
+ /// Format: `projects/<Project ID>`.
628
+ /// </param>
629
+ /// <param name="callSettings">
630
+ /// If not null, applies overrides to this RPC call.
631
+ /// </param>
632
+ /// <returns>
633
+ /// A Task containing the RPC response.
634
+ /// </returns>
635
+ public virtual stt ::Task < Agent > GetAgentAsync (
636
+ string parent ,
637
+ gaxgrpc ::CallSettings callSettings = null ) => GetAgentAsync (
638
+ new GetAgentRequest
639
+ {
640
+ Parent = gax ::GaxPreconditions . CheckNotNullOrEmpty ( parent , nameof ( parent ) ) ,
641
+ } ,
642
+ callSettings ) ;
643
+
644
+ /// <summary>
645
+ /// Retrieves the specified agent.
646
+ /// </summary>
647
+ /// <param name="parent">
648
+ /// Required. The project that the agent to fetch is associated with.
649
+ /// Format: `projects/<Project ID>`.
650
+ /// </param>
651
+ /// <param name="cancellationToken">
652
+ /// A <see cref="st::CancellationToken"/> to use for this RPC.
653
+ /// </param>
654
+ /// <returns>
655
+ /// A Task containing the RPC response.
656
+ /// </returns>
657
+ public virtual stt ::Task < Agent > GetAgentAsync (
658
+ string parent ,
659
+ st ::CancellationToken cancellationToken ) => GetAgentAsync (
660
+ parent ,
661
+ gaxgrpc ::CallSettings . FromCancellationToken ( cancellationToken ) ) ;
662
+
663
+ /// <summary>
664
+ /// Retrieves the specified agent.
665
+ /// </summary>
666
+ /// <param name="parent">
667
+ /// Required. The project that the agent to fetch is associated with.
668
+ /// Format: `projects/<Project ID>`.
669
+ /// </param>
670
+ /// <param name="callSettings">
671
+ /// If not null, applies overrides to this RPC call.
672
+ /// </param>
673
+ /// <returns>
674
+ /// The RPC response.
675
+ /// </returns>
676
+ public virtual Agent GetAgent (
677
+ string parent ,
678
+ gaxgrpc ::CallSettings callSettings = null ) => GetAgent (
679
+ new GetAgentRequest
680
+ {
681
+ Parent = gax ::GaxPreconditions . CheckNotNullOrEmpty ( parent , nameof ( parent ) ) ,
682
+ } ,
683
+ callSettings ) ;
684
+
622
685
/// <summary>
623
686
/// Retrieves the specified agent.
624
687
/// </summary>
@@ -755,6 +818,86 @@ public virtual Agent GetAgent(
755
818
} ,
756
819
callSettings ) ;
757
820
821
+ /// <summary>
822
+ /// Returns the list of agents.
823
+ ///
824
+ /// Since there is at most one conversational agent per project, this method is
825
+ /// useful primarily for listing all agents across projects the caller has
826
+ /// access to. One can achieve that with a wildcard project collection id "-".
827
+ /// Refer to [List
828
+ /// Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
829
+ /// </summary>
830
+ /// <param name="parent">
831
+ /// Required. The project to list agents from.
832
+ /// Format: `projects/<Project ID or '-'>`.
833
+ /// </param>
834
+ /// <param name="pageToken">
835
+ /// The token returned from the previous request.
836
+ /// A value of <c>null</c> or an empty string retrieves the first page.
837
+ /// </param>
838
+ /// <param name="pageSize">
839
+ /// The size of page to request. The response will not be larger than this, but may be smaller.
840
+ /// A value of <c>null</c> or 0 uses a server-defined page size.
841
+ /// </param>
842
+ /// <param name="callSettings">
843
+ /// If not null, applies overrides to this RPC call.
844
+ /// </param>
845
+ /// <returns>
846
+ /// A pageable asynchronous sequence of <see cref="Agent"/> resources.
847
+ /// </returns>
848
+ public virtual gax ::PagedAsyncEnumerable < SearchAgentsResponse , Agent > SearchAgentsAsync (
849
+ string parent ,
850
+ string pageToken = null ,
851
+ int ? pageSize = null ,
852
+ gaxgrpc ::CallSettings callSettings = null ) => SearchAgentsAsync (
853
+ new SearchAgentsRequest
854
+ {
855
+ Parent = gax ::GaxPreconditions . CheckNotNullOrEmpty ( parent , nameof ( parent ) ) ,
856
+ PageToken = pageToken ?? "" ,
857
+ PageSize = pageSize ?? 0 ,
858
+ } ,
859
+ callSettings ) ;
860
+
861
+ /// <summary>
862
+ /// Returns the list of agents.
863
+ ///
864
+ /// Since there is at most one conversational agent per project, this method is
865
+ /// useful primarily for listing all agents across projects the caller has
866
+ /// access to. One can achieve that with a wildcard project collection id "-".
867
+ /// Refer to [List
868
+ /// Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
869
+ /// </summary>
870
+ /// <param name="parent">
871
+ /// Required. The project to list agents from.
872
+ /// Format: `projects/<Project ID or '-'>`.
873
+ /// </param>
874
+ /// <param name="pageToken">
875
+ /// The token returned from the previous request.
876
+ /// A value of <c>null</c> or an empty string retrieves the first page.
877
+ /// </param>
878
+ /// <param name="pageSize">
879
+ /// The size of page to request. The response will not be larger than this, but may be smaller.
880
+ /// A value of <c>null</c> or 0 uses a server-defined page size.
881
+ /// </param>
882
+ /// <param name="callSettings">
883
+ /// If not null, applies overrides to this RPC call.
884
+ /// </param>
885
+ /// <returns>
886
+ /// A pageable sequence of <see cref="Agent"/> resources.
887
+ /// </returns>
888
+ public virtual gax ::PagedEnumerable < SearchAgentsResponse , Agent > SearchAgents (
889
+ string parent ,
890
+ string pageToken = null ,
891
+ int ? pageSize = null ,
892
+ gaxgrpc ::CallSettings callSettings = null ) => SearchAgents (
893
+ new SearchAgentsRequest
894
+ {
895
+ Parent = gax ::GaxPreconditions . CheckNotNullOrEmpty ( parent , nameof ( parent ) ) ,
896
+ PageToken = pageToken ?? "" ,
897
+ PageSize = pageSize ?? 0 ,
898
+ } ,
899
+ callSettings ) ;
900
+
758
901
/// <summary>
759
902
/// Returns the list of agents.
760
903
///
@@ -874,6 +1017,75 @@ public virtual Agent GetAgent(
874
1017
} ,
875
1018
callSettings ) ;
876
1019
1020
+ /// <summary>
1021
+ /// Trains the specified agent.
1022
+ ///
1023
+ /// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
1024
+ /// </summary>
1025
+ /// <param name="parent">
1026
+ /// Required. The project that the agent to train is associated with.
1027
+ /// Format: `projects/<Project ID>`.
1028
+ /// </param>
1029
+ /// <param name="callSettings">
1030
+ /// If not null, applies overrides to this RPC call.
1031
+ /// </param>
1032
+ /// <returns>
1033
+ /// A Task containing the RPC response.
1034
+ /// </returns>
1035
+ public virtual stt ::Task < lro ::Operation < pbwkt ::Empty , pbwkt ::Struct > > TrainAgentAsync (
1036
+ string parent ,
1037
+ gaxgrpc ::CallSettings callSettings = null ) => TrainAgentAsync (
1038
+ new TrainAgentRequest
1039
+ {
1040
+ Parent = gax ::GaxPreconditions . CheckNotNullOrEmpty ( parent , nameof ( parent ) ) ,
1041
+ } ,
1042
+ callSettings ) ;
1043
+
1044
+ /// <summary>
1045
+ /// Trains the specified agent.
1046
+ ///
1047
+ /// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
1048
+ /// </summary>
1049
+ /// <param name="parent">
1050
+ /// Required. The project that the agent to train is associated with.
1051
+ /// Format: `projects/<Project ID>`.
1052
+ /// </param>
1053
+ /// <param name="cancellationToken">
1054
+ /// A <see cref="st::CancellationToken"/> to use for this RPC.
1055
+ /// </param>
1056
+ /// <returns>
1057
+ /// A Task containing the RPC response.
1058
+ /// </returns>
1059
+ public virtual stt ::Task < lro ::Operation < pbwkt ::Empty , pbwkt ::Struct > > TrainAgentAsync (
1060
+ string parent ,
1061
+ st ::CancellationToken cancellationToken ) => TrainAgentAsync (
1062
+ parent ,
1063
+ gaxgrpc ::CallSettings . FromCancellationToken ( cancellationToken ) ) ;
1064
+
1065
+ /// <summary>
1066
+ /// Trains the specified agent.
1067
+ ///
1068
+ /// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
1069
+ /// </summary>
1070
+ /// <param name="parent">
1071
+ /// Required. The project that the agent to train is associated with.
1072
+ /// Format: `projects/<Project ID>`.
1073
+ /// </param>
1074
+ /// <param name="callSettings">
1075
+ /// If not null, applies overrides to this RPC call.
1076
+ /// </param>
1077
+ /// <returns>
1078
+ /// The RPC response.
1079
+ /// </returns>
1080
+ public virtual lro ::Operation < pbwkt ::Empty , pbwkt ::Struct > TrainAgent (
1081
+ string parent ,
1082
+ gaxgrpc ::CallSettings callSettings = null ) => TrainAgent (
1083
+ new TrainAgentRequest
1084
+ {
1085
+ Parent = gax ::GaxPreconditions . CheckNotNullOrEmpty ( parent , nameof ( parent ) ) ,
1086
+ } ,
1087
+ callSettings ) ;
1088
+
877
1089
/// <summary>
878
1090
/// Trains the specified agent.
879
1091
///
@@ -1019,6 +1231,75 @@ public virtual Agent GetAgent(
1019
1231
} ,
1020
1232
callSettings ) ;
1021
1233
1234
+ /// <summary>
1235
+ /// Exports the specified agent to a ZIP file.
1236
+ ///
1237
+ /// Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
1238
+ /// </summary>
1239
+ /// <param name="parent">
1240
+ /// Required. The project that the agent to export is associated with.
1241
+ /// Format: `projects/<Project ID>`.
1242
+ /// </param>
1243
+ /// <param name="callSettings">
1244
+ /// If not null, applies overrides to this RPC call.
1245
+ /// </param>
1246
+ /// <returns>
1247
+ /// A Task containing the RPC response.
1248
+ /// </returns>
1249
+ public virtual stt ::Task < lro ::Operation < ExportAgentResponse , pbwkt ::Struct > > ExportAgentAsync (
1250
+ string parent ,
1251
+ gaxgrpc ::CallSettings callSettings = null ) => ExportAgentAsync (
1252
+ new ExportAgentRequest
1253
+ {
1254
+ Parent = gax ::GaxPreconditions . CheckNotNullOrEmpty ( parent , nameof ( parent ) ) ,
1255
+ } ,
1256
+ callSettings ) ;
1257
+
1258
+ /// <summary>
1259
+ /// Exports the specified agent to a ZIP file.
1260
+ ///
1261
+ /// Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
1262
+ /// </summary>
1263
+ /// <param name="parent">
1264
+ /// Required. The project that the agent to export is associated with.
1265
+ /// Format: `projects/<Project ID>`.
1266
+ /// </param>
1267
+ /// <param name="cancellationToken">
1268
+ /// A <see cref="st::CancellationToken"/> to use for this RPC.
1269
+ /// </param>
1270
+ /// <returns>
1271
+ /// A Task containing the RPC response.
1272
+ /// </returns>
1273
+ public virtual stt ::Task < lro ::Operation < ExportAgentResponse , pbwkt ::Struct > > ExportAgentAsync (
1274
+ string parent ,
1275
+ st ::CancellationToken cancellationToken ) => ExportAgentAsync (
1276
+ parent ,
1277
+ gaxgrpc ::CallSettings . FromCancellationToken ( cancellationToken ) ) ;
1278
+
1279
+ /// <summary>
1280
+ /// Exports the specified agent to a ZIP file.
1281
+ ///
1282
+ /// Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
1283
+ /// </summary>
1284
+ /// <param name="parent">
1285
+ /// Required. The project that the agent to export is associated with.
1286
+ /// Format: `projects/<Project ID>`.
1287
+ /// </param>
1288
+ /// <param name="callSettings">
1289
+ /// If not null, applies overrides to this RPC call.
1290
+ /// </param>
1291
+ /// <returns>
1292
+ /// The RPC response.
1293
+ /// </returns>
1294
+ public virtual lro ::Operation < ExportAgentResponse , pbwkt ::Struct > ExportAgent (
1295
+ string parent ,
1296
+ gaxgrpc ::CallSettings callSettings = null ) => ExportAgent (
1297
+ new ExportAgentRequest
1298
+ {
1299
+ Parent = gax ::GaxPreconditions . CheckNotNullOrEmpty ( parent , nameof ( parent ) ) ,
1300
+ } ,
1301
+ callSettings ) ;
1302
+
1022
1303
/// <summary>
1023
1304
/// Exports the specified agent to a ZIP file.
1024
1305
///
0 commit comments