@@ -49,8 +49,18 @@ class EnvironmentsAsyncClient:
49
49
DEFAULT_ENDPOINT = EnvironmentsClient .DEFAULT_ENDPOINT
50
50
DEFAULT_MTLS_ENDPOINT = EnvironmentsClient .DEFAULT_MTLS_ENDPOINT
51
51
52
+ continuous_test_result_path = staticmethod (
53
+ EnvironmentsClient .continuous_test_result_path
54
+ )
55
+ parse_continuous_test_result_path = staticmethod (
56
+ EnvironmentsClient .parse_continuous_test_result_path
57
+ )
52
58
environment_path = staticmethod (EnvironmentsClient .environment_path )
53
59
parse_environment_path = staticmethod (EnvironmentsClient .parse_environment_path )
60
+ test_case_result_path = staticmethod (EnvironmentsClient .test_case_result_path )
61
+ parse_test_case_result_path = staticmethod (
62
+ EnvironmentsClient .parse_test_case_result_path
63
+ )
54
64
version_path = staticmethod (EnvironmentsClient .version_path )
55
65
parse_version_path = staticmethod (EnvironmentsClient .parse_version_path )
56
66
common_billing_account_path = staticmethod (
@@ -691,6 +701,151 @@ async def lookup_environment_history(
691
701
# Done; return the response.
692
702
return response
693
703
704
+ async def run_continuous_test (
705
+ self ,
706
+ request : environment .RunContinuousTestRequest = None ,
707
+ * ,
708
+ retry : retries .Retry = gapic_v1 .method .DEFAULT ,
709
+ timeout : float = None ,
710
+ metadata : Sequence [Tuple [str , str ]] = (),
711
+ ) -> operation_async .AsyncOperation :
712
+ r"""Kicks off a continuous test under the specified
713
+ [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
714
+
715
+ Args:
716
+ request (:class:`google.cloud.dialogflowcx_v3beta1.types.RunContinuousTestRequest`):
717
+ The request object. The request message for
718
+ [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest].
719
+ retry (google.api_core.retry.Retry): Designation of what errors, if any,
720
+ should be retried.
721
+ timeout (float): The timeout for this request.
722
+ metadata (Sequence[Tuple[str, str]]): Strings which should be
723
+ sent along with the request as metadata.
724
+
725
+ Returns:
726
+ google.api_core.operation_async.AsyncOperation:
727
+ An object representing a long-running operation.
728
+
729
+ The result type for the operation will be
730
+ :class:`google.cloud.dialogflowcx_v3beta1.types.RunContinuousTestResponse`
731
+ The response message for
732
+ [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest].
733
+
734
+ """
735
+ # Create or coerce a protobuf request object.
736
+ request = environment .RunContinuousTestRequest (request )
737
+
738
+ # Wrap the RPC method; this adds retry and timeout information,
739
+ # and friendly error handling.
740
+ rpc = gapic_v1 .method_async .wrap_method (
741
+ self ._client ._transport .run_continuous_test ,
742
+ default_timeout = None ,
743
+ client_info = DEFAULT_CLIENT_INFO ,
744
+ )
745
+
746
+ # Certain fields should be provided within the metadata header;
747
+ # add these here.
748
+ metadata = tuple (metadata ) + (
749
+ gapic_v1 .routing_header .to_grpc_metadata (
750
+ (("environment" , request .environment ),)
751
+ ),
752
+ )
753
+
754
+ # Send the request.
755
+ response = await rpc (request , retry = retry , timeout = timeout , metadata = metadata ,)
756
+
757
+ # Wrap the response in an operation future.
758
+ response = operation_async .from_gapic (
759
+ response ,
760
+ self ._client ._transport .operations_client ,
761
+ environment .RunContinuousTestResponse ,
762
+ metadata_type = environment .RunContinuousTestMetadata ,
763
+ )
764
+
765
+ # Done; return the response.
766
+ return response
767
+
768
+ async def list_continuous_test_results (
769
+ self ,
770
+ request : environment .ListContinuousTestResultsRequest = None ,
771
+ * ,
772
+ parent : str = None ,
773
+ retry : retries .Retry = gapic_v1 .method .DEFAULT ,
774
+ timeout : float = None ,
775
+ metadata : Sequence [Tuple [str , str ]] = (),
776
+ ) -> pagers .ListContinuousTestResultsAsyncPager :
777
+ r"""Fetches a list of continuous test results for a given
778
+ environment.
779
+
780
+ Args:
781
+ request (:class:`google.cloud.dialogflowcx_v3beta1.types.ListContinuousTestResultsRequest`):
782
+ The request object. The request message for
783
+ [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResults].
784
+ parent (:class:`str`):
785
+ Required. The environment to list results for. Format:
786
+ ``projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/ environments/<Environment ID>``.
787
+
788
+ This corresponds to the ``parent`` field
789
+ on the ``request`` instance; if ``request`` is provided, this
790
+ should not be set.
791
+ retry (google.api_core.retry.Retry): Designation of what errors, if any,
792
+ should be retried.
793
+ timeout (float): The timeout for this request.
794
+ metadata (Sequence[Tuple[str, str]]): Strings which should be
795
+ sent along with the request as metadata.
796
+
797
+ Returns:
798
+ google.cloud.dialogflowcx_v3beta1.services.environments.pagers.ListContinuousTestResultsAsyncPager:
799
+ The response message for
800
+ [Environments.ListTestCaseResults][].
801
+
802
+ Iterating over this object will yield results and
803
+ resolve additional pages automatically.
804
+
805
+ """
806
+ # Create or coerce a protobuf request object.
807
+ # Sanity check: If we got a request object, we should *not* have
808
+ # gotten any keyword arguments that map to the request.
809
+ has_flattened_params = any ([parent ])
810
+ if request is not None and has_flattened_params :
811
+ raise ValueError (
812
+ "If the `request` argument is set, then none of "
813
+ "the individual field arguments should be set."
814
+ )
815
+
816
+ request = environment .ListContinuousTestResultsRequest (request )
817
+
818
+ # If we have keyword arguments corresponding to fields on the
819
+ # request, apply these.
820
+ if parent is not None :
821
+ request .parent = parent
822
+
823
+ # Wrap the RPC method; this adds retry and timeout information,
824
+ # and friendly error handling.
825
+ rpc = gapic_v1 .method_async .wrap_method (
826
+ self ._client ._transport .list_continuous_test_results ,
827
+ default_timeout = None ,
828
+ client_info = DEFAULT_CLIENT_INFO ,
829
+ )
830
+
831
+ # Certain fields should be provided within the metadata header;
832
+ # add these here.
833
+ metadata = tuple (metadata ) + (
834
+ gapic_v1 .routing_header .to_grpc_metadata ((("parent" , request .parent ),)),
835
+ )
836
+
837
+ # Send the request.
838
+ response = await rpc (request , retry = retry , timeout = timeout , metadata = metadata ,)
839
+
840
+ # This method is paged; wrap the response in a pager, which provides
841
+ # an `__aiter__` convenience method.
842
+ response = pagers .ListContinuousTestResultsAsyncPager (
843
+ method = rpc , request = request , response = response , metadata = metadata ,
844
+ )
845
+
846
+ # Done; return the response.
847
+ return response
848
+
694
849
695
850
try :
696
851
DEFAULT_CLIENT_INFO = gapic_v1 .client_info .ClientInfo (
0 commit comments