google-apis-dialogflow_v2 0.8.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -409,8 +409,9 @@ module Google
409
409
 
410
410
  # Updates the fulfillment.
411
411
  # @param [String] name
412
- # Required. The unique identifier of the fulfillment. Format: `projects//agent/
413
- # fulfillment`.
412
+ # Required. The unique identifier of the fulfillment. Supported formats: - `
413
+ # projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This
414
+ # field is not used for Fulfillment in an Environment.
414
415
  # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment] google_cloud_dialogflow_v2_fulfillment_object
415
416
  # @param [String] update_mask
416
417
  # Required. The mask to control which fields get updated. If the mask is not
@@ -810,9 +811,148 @@ module Google
810
811
  execute_or_queue_command(command, &block)
811
812
  end
812
813
 
814
+ # Creates an agent environment.
815
+ # @param [String] parent
816
+ # Required. The agent to create an environment for. Supported formats: - `
817
+ # projects//agent` - `projects//locations//agent`
818
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] google_cloud_dialogflow_v2_environment_object
819
+ # @param [String] environment_id
820
+ # Required. The unique id of the new environment.
821
+ # @param [String] fields
822
+ # Selector specifying which fields to include in a partial response.
823
+ # @param [String] quota_user
824
+ # Available to use for quota purposes for server-side applications. Can be any
825
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
826
+ # @param [Google::Apis::RequestOptions] options
827
+ # Request-specific options
828
+ #
829
+ # @yield [result, err] Result & error if block supplied
830
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] parsed result object
831
+ # @yieldparam err [StandardError] error object if request failed
832
+ #
833
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment]
834
+ #
835
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
836
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
837
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
838
+ def create_project_agent_environment(parent, google_cloud_dialogflow_v2_environment_object = nil, environment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
839
+ command = make_simple_command(:post, 'v2/{+parent}/environments', options)
840
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
841
+ command.request_object = google_cloud_dialogflow_v2_environment_object
842
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
843
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment
844
+ command.params['parent'] = parent unless parent.nil?
845
+ command.query['environmentId'] = environment_id unless environment_id.nil?
846
+ command.query['fields'] = fields unless fields.nil?
847
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
848
+ execute_or_queue_command(command, &block)
849
+ end
850
+
851
+ # Deletes the specified agent environment.
852
+ # @param [String] name
853
+ # Required. The name of the environment to delete. / Format: - `projects//agent/
854
+ # environments/` - `projects//locations//agent/environments/`
855
+ # @param [String] fields
856
+ # Selector specifying which fields to include in a partial response.
857
+ # @param [String] quota_user
858
+ # Available to use for quota purposes for server-side applications. Can be any
859
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
860
+ # @param [Google::Apis::RequestOptions] options
861
+ # Request-specific options
862
+ #
863
+ # @yield [result, err] Result & error if block supplied
864
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
865
+ # @yieldparam err [StandardError] error object if request failed
866
+ #
867
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
868
+ #
869
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
870
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
871
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
872
+ def delete_project_agent_environment(name, fields: nil, quota_user: nil, options: nil, &block)
873
+ command = make_simple_command(:delete, 'v2/{+name}', options)
874
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
875
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
876
+ command.params['name'] = name unless name.nil?
877
+ command.query['fields'] = fields unless fields.nil?
878
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
879
+ execute_or_queue_command(command, &block)
880
+ end
881
+
882
+ # Retrieves the specified agent environment.
883
+ # @param [String] name
884
+ # Required. The name of the environment. Supported formats: - `projects//agent/
885
+ # environments/` - `projects//locations//agent/environments/`
886
+ # @param [String] fields
887
+ # Selector specifying which fields to include in a partial response.
888
+ # @param [String] quota_user
889
+ # Available to use for quota purposes for server-side applications. Can be any
890
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
891
+ # @param [Google::Apis::RequestOptions] options
892
+ # Request-specific options
893
+ #
894
+ # @yield [result, err] Result & error if block supplied
895
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] parsed result object
896
+ # @yieldparam err [StandardError] error object if request failed
897
+ #
898
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment]
899
+ #
900
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
901
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
902
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
903
+ def get_project_agent_environment(name, fields: nil, quota_user: nil, options: nil, &block)
904
+ command = make_simple_command(:get, 'v2/{+name}', options)
905
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
906
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment
907
+ command.params['name'] = name unless name.nil?
908
+ command.query['fields'] = fields unless fields.nil?
909
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
910
+ execute_or_queue_command(command, &block)
911
+ end
912
+
913
+ # Gets the history of the specified environment.
914
+ # @param [String] parent
915
+ # Required. The name of the environment to retrieve history for. Supported
916
+ # formats: - `projects//agent/environments/` - `projects//locations//agent/
917
+ # environments/`
918
+ # @param [Fixnum] page_size
919
+ # Optional. The maximum number of items to return in a single page. By default
920
+ # 100 and at most 1000.
921
+ # @param [String] page_token
922
+ # Optional. The next_page_token value returned from a previous list request.
923
+ # @param [String] fields
924
+ # Selector specifying which fields to include in a partial response.
925
+ # @param [String] quota_user
926
+ # Available to use for quota purposes for server-side applications. Can be any
927
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
928
+ # @param [Google::Apis::RequestOptions] options
929
+ # Request-specific options
930
+ #
931
+ # @yield [result, err] Result & error if block supplied
932
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistory] parsed result object
933
+ # @yieldparam err [StandardError] error object if request failed
934
+ #
935
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistory]
936
+ #
937
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
938
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
939
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
940
+ def get_project_agent_environment_history(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
941
+ command = make_simple_command(:get, 'v2/{+parent}/history', options)
942
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistory::Representation
943
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistory
944
+ command.params['parent'] = parent unless parent.nil?
945
+ command.query['pageSize'] = page_size unless page_size.nil?
946
+ command.query['pageToken'] = page_token unless page_token.nil?
947
+ command.query['fields'] = fields unless fields.nil?
948
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
949
+ execute_or_queue_command(command, &block)
950
+ end
951
+
813
952
  # Returns the list of all non-draft environments of the specified agent.
814
953
  # @param [String] parent
815
- # Required. The agent to list all environments from. Format: `projects//agent`.
954
+ # Required. The agent to list all environments from. Format: - `projects//agent`
955
+ # - `projects//locations//agent`
816
956
  # @param [Fixnum] page_size
817
957
  # Optional. The maximum number of items to return in a single page. By default
818
958
  # 100 and at most 1000.
@@ -847,9 +987,66 @@ module Google
847
987
  execute_or_queue_command(command, &block)
848
988
  end
849
989
 
990
+ # Updates the specified agent environment. This method allows you to deploy new
991
+ # agent versions into the environment. When an environment is pointed to a new
992
+ # agent version by setting `environment.agent_version`, the environment is
993
+ # temporarily set to the `LOADING` state. During that time, the environment
994
+ # keeps on serving the previous version of the agent. After the new agent
995
+ # version is done loading, the environment is set back to the `RUNNING` state.
996
+ # You can use "-" as Environment ID in environment name to update version in "
997
+ # draft" environment. WARNING: this will negate all recent changes to draft and
998
+ # can't be undone. You may want to save the draft to a version before calling
999
+ # this function.
1000
+ # @param [String] name
1001
+ # Output only. The unique identifier of this agent environment. Supported
1002
+ # formats: - `projects//agent/environments/` - `projects//locations//agent/
1003
+ # environments/`
1004
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] google_cloud_dialogflow_v2_environment_object
1005
+ # @param [Boolean] allow_load_to_draft_and_discard_changes
1006
+ # Optional. This field is used to prevent accidental overwrite of the draft
1007
+ # environment, which is an operation that cannot be undone. To confirm that the
1008
+ # caller desires this overwrite, this field must be explicitly set to true when
1009
+ # updating the draft environment (environment ID = `-`).
1010
+ # @param [String] update_mask
1011
+ # Required. The mask to control which fields get updated.
1012
+ # @param [String] fields
1013
+ # Selector specifying which fields to include in a partial response.
1014
+ # @param [String] quota_user
1015
+ # Available to use for quota purposes for server-side applications. Can be any
1016
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1017
+ # @param [Google::Apis::RequestOptions] options
1018
+ # Request-specific options
1019
+ #
1020
+ # @yield [result, err] Result & error if block supplied
1021
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] parsed result object
1022
+ # @yieldparam err [StandardError] error object if request failed
1023
+ #
1024
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment]
1025
+ #
1026
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1027
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1028
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1029
+ def patch_project_agent_environment(name, google_cloud_dialogflow_v2_environment_object = nil, allow_load_to_draft_and_discard_changes: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1030
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1031
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
1032
+ command.request_object = google_cloud_dialogflow_v2_environment_object
1033
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
1034
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment
1035
+ command.params['name'] = name unless name.nil?
1036
+ command.query['allowLoadToDraftAndDiscardChanges'] = allow_load_to_draft_and_discard_changes unless allow_load_to_draft_and_discard_changes.nil?
1037
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1038
+ command.query['fields'] = fields unless fields.nil?
1039
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1040
+ execute_or_queue_command(command, &block)
1041
+ end
1042
+
850
1043
  # Returns the list of all intents in the specified agent.
851
1044
  # @param [String] parent
852
- # Required. The agent to list all intents from. Format: `projects//agent`.
1045
+ # Required. The agent to list all intents from. Format: `projects//agent` or `
1046
+ # projects//locations//agent`. Alternatively, you can specify the environment to
1047
+ # list intents for. Format: `projects//agent/environments/` or `projects//
1048
+ # locations//agent/environments/`. Note: training phrases of the intents will
1049
+ # not be returned for non-draft environment.
853
1050
  # @param [String] intent_view
854
1051
  # Optional. The resource view to apply to the returned intent.
855
1052
  # @param [String] language_code
@@ -1539,7 +1736,11 @@ module Google
1539
1736
 
1540
1737
  # Returns the list of all intents in the specified agent.
1541
1738
  # @param [String] parent
1542
- # Required. The agent to list all intents from. Format: `projects//agent`.
1739
+ # Required. The agent to list all intents from. Format: `projects//agent` or `
1740
+ # projects//locations//agent`. Alternatively, you can specify the environment to
1741
+ # list intents for. Format: `projects//agent/environments/` or `projects//
1742
+ # locations//agent/environments/`. Note: training phrases of the intents will
1743
+ # not be returned for non-draft environment.
1543
1744
  # @param [String] intent_view
1544
1745
  # Optional. The resource view to apply to the returned intent.
1545
1746
  # @param [String] language_code
@@ -2482,6 +2683,180 @@ module Google
2482
2683
  execute_or_queue_command(command, &block)
2483
2684
  end
2484
2685
 
2686
+ # Creates an agent version. The new version points to the agent instance in the "
2687
+ # default" environment.
2688
+ # @param [String] parent
2689
+ # Required. The agent to create a version for. Supported formats: - `projects//
2690
+ # agent` - `projects//locations//agent`
2691
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] google_cloud_dialogflow_v2_version_object
2692
+ # @param [String] fields
2693
+ # Selector specifying which fields to include in a partial response.
2694
+ # @param [String] quota_user
2695
+ # Available to use for quota purposes for server-side applications. Can be any
2696
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2697
+ # @param [Google::Apis::RequestOptions] options
2698
+ # Request-specific options
2699
+ #
2700
+ # @yield [result, err] Result & error if block supplied
2701
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] parsed result object
2702
+ # @yieldparam err [StandardError] error object if request failed
2703
+ #
2704
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version]
2705
+ #
2706
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2707
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2708
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2709
+ def create_project_agent_version(parent, google_cloud_dialogflow_v2_version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2710
+ command = make_simple_command(:post, 'v2/{+parent}/versions', options)
2711
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
2712
+ command.request_object = google_cloud_dialogflow_v2_version_object
2713
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
2714
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version
2715
+ command.params['parent'] = parent unless parent.nil?
2716
+ command.query['fields'] = fields unless fields.nil?
2717
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2718
+ execute_or_queue_command(command, &block)
2719
+ end
2720
+
2721
+ # Delete the specified agent version.
2722
+ # @param [String] name
2723
+ # Required. The name of the version to delete. Supported formats: - `projects//
2724
+ # agent/versions/` - `projects//locations//agent/versions/`
2725
+ # @param [String] fields
2726
+ # Selector specifying which fields to include in a partial response.
2727
+ # @param [String] quota_user
2728
+ # Available to use for quota purposes for server-side applications. Can be any
2729
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2730
+ # @param [Google::Apis::RequestOptions] options
2731
+ # Request-specific options
2732
+ #
2733
+ # @yield [result, err] Result & error if block supplied
2734
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
2735
+ # @yieldparam err [StandardError] error object if request failed
2736
+ #
2737
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
2738
+ #
2739
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2740
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2741
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2742
+ def delete_project_agent_version(name, fields: nil, quota_user: nil, options: nil, &block)
2743
+ command = make_simple_command(:delete, 'v2/{+name}', options)
2744
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
2745
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
2746
+ command.params['name'] = name unless name.nil?
2747
+ command.query['fields'] = fields unless fields.nil?
2748
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2749
+ execute_or_queue_command(command, &block)
2750
+ end
2751
+
2752
+ # Retrieves the specified agent version.
2753
+ # @param [String] name
2754
+ # Required. The name of the version. Supported formats: - `projects//agent/
2755
+ # versions/` - `projects//locations//agent/versions/`
2756
+ # @param [String] fields
2757
+ # Selector specifying which fields to include in a partial response.
2758
+ # @param [String] quota_user
2759
+ # Available to use for quota purposes for server-side applications. Can be any
2760
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2761
+ # @param [Google::Apis::RequestOptions] options
2762
+ # Request-specific options
2763
+ #
2764
+ # @yield [result, err] Result & error if block supplied
2765
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] parsed result object
2766
+ # @yieldparam err [StandardError] error object if request failed
2767
+ #
2768
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version]
2769
+ #
2770
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2771
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2772
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2773
+ def get_project_agent_version(name, fields: nil, quota_user: nil, options: nil, &block)
2774
+ command = make_simple_command(:get, 'v2/{+name}', options)
2775
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
2776
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version
2777
+ command.params['name'] = name unless name.nil?
2778
+ command.query['fields'] = fields unless fields.nil?
2779
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2780
+ execute_or_queue_command(command, &block)
2781
+ end
2782
+
2783
+ # Returns the list of all versions of the specified agent.
2784
+ # @param [String] parent
2785
+ # Required. The agent to list all versions from. Supported formats: - `projects//
2786
+ # agent` - `projects//locations//agent`
2787
+ # @param [Fixnum] page_size
2788
+ # Optional. The maximum number of items to return in a single page. By default
2789
+ # 100 and at most 1000.
2790
+ # @param [String] page_token
2791
+ # Optional. The next_page_token value returned from a previous list request.
2792
+ # @param [String] fields
2793
+ # Selector specifying which fields to include in a partial response.
2794
+ # @param [String] quota_user
2795
+ # Available to use for quota purposes for server-side applications. Can be any
2796
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2797
+ # @param [Google::Apis::RequestOptions] options
2798
+ # Request-specific options
2799
+ #
2800
+ # @yield [result, err] Result & error if block supplied
2801
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListVersionsResponse] parsed result object
2802
+ # @yieldparam err [StandardError] error object if request failed
2803
+ #
2804
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListVersionsResponse]
2805
+ #
2806
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2807
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2808
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2809
+ def list_project_agent_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2810
+ command = make_simple_command(:get, 'v2/{+parent}/versions', options)
2811
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListVersionsResponse::Representation
2812
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListVersionsResponse
2813
+ command.params['parent'] = parent unless parent.nil?
2814
+ command.query['pageSize'] = page_size unless page_size.nil?
2815
+ command.query['pageToken'] = page_token unless page_token.nil?
2816
+ command.query['fields'] = fields unless fields.nil?
2817
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2818
+ execute_or_queue_command(command, &block)
2819
+ end
2820
+
2821
+ # Updates the specified agent version. Note that this method does not allow you
2822
+ # to update the state of the agent the given version points to. It allows you to
2823
+ # update only mutable properties of the version resource.
2824
+ # @param [String] name
2825
+ # Output only. The unique identifier of this agent version. Supported formats: -
2826
+ # `projects//agent/versions/` - `projects//locations//agent/versions/`
2827
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] google_cloud_dialogflow_v2_version_object
2828
+ # @param [String] update_mask
2829
+ # Required. The mask to control which fields get updated.
2830
+ # @param [String] fields
2831
+ # Selector specifying which fields to include in a partial response.
2832
+ # @param [String] quota_user
2833
+ # Available to use for quota purposes for server-side applications. Can be any
2834
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2835
+ # @param [Google::Apis::RequestOptions] options
2836
+ # Request-specific options
2837
+ #
2838
+ # @yield [result, err] Result & error if block supplied
2839
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] parsed result object
2840
+ # @yieldparam err [StandardError] error object if request failed
2841
+ #
2842
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version]
2843
+ #
2844
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2845
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2846
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2847
+ def patch_project_agent_version(name, google_cloud_dialogflow_v2_version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2848
+ command = make_simple_command(:patch, 'v2/{+name}', options)
2849
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
2850
+ command.request_object = google_cloud_dialogflow_v2_version_object
2851
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
2852
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version
2853
+ command.params['name'] = name unless name.nil?
2854
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2855
+ command.query['fields'] = fields unless fields.nil?
2856
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2857
+ execute_or_queue_command(command, &block)
2858
+ end
2859
+
2485
2860
  # Returns the list of all answer records in the specified project in reverse
2486
2861
  # chronological order.
2487
2862
  # @param [String] parent
@@ -2960,7 +3335,7 @@ module Google
2960
3335
  # Adds a text (chat, for example), or audio (phone recording, for example)
2961
3336
  # message from a participant into the conversation. Note: Always use agent
2962
3337
  # versions for production traffic sent to virtual agents. See [Versions and
2963
- # environments(https://cloud.google.com/dialogflow/es/docs/agents-versions).
3338
+ # environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
2964
3339
  # @param [String] participant
2965
3340
  # Required. The name of the participant this text comes from. Format: `projects//
2966
3341
  # locations//conversations//participants/`.
@@ -3952,8 +4327,9 @@ module Google
3952
4327
 
3953
4328
  # Updates the fulfillment.
3954
4329
  # @param [String] name
3955
- # Required. The unique identifier of the fulfillment. Format: `projects//agent/
3956
- # fulfillment`.
4330
+ # Required. The unique identifier of the fulfillment. Supported formats: - `
4331
+ # projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This
4332
+ # field is not used for Fulfillment in an Environment.
3957
4333
  # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment] google_cloud_dialogflow_v2_fulfillment_object
3958
4334
  # @param [String] update_mask
3959
4335
  # Required. The mask to control which fields get updated. If the mask is not
@@ -4353,10 +4729,149 @@ module Google
4353
4729
  execute_or_queue_command(command, &block)
4354
4730
  end
4355
4731
 
4356
- # Returns the list of all non-draft environments of the specified agent.
4732
+ # Creates an agent environment.
4357
4733
  # @param [String] parent
4358
- # Required. The agent to list all environments from. Format: `projects//agent`.
4359
- # @param [Fixnum] page_size
4734
+ # Required. The agent to create an environment for. Supported formats: - `
4735
+ # projects//agent` - `projects//locations//agent`
4736
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] google_cloud_dialogflow_v2_environment_object
4737
+ # @param [String] environment_id
4738
+ # Required. The unique id of the new environment.
4739
+ # @param [String] fields
4740
+ # Selector specifying which fields to include in a partial response.
4741
+ # @param [String] quota_user
4742
+ # Available to use for quota purposes for server-side applications. Can be any
4743
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4744
+ # @param [Google::Apis::RequestOptions] options
4745
+ # Request-specific options
4746
+ #
4747
+ # @yield [result, err] Result & error if block supplied
4748
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] parsed result object
4749
+ # @yieldparam err [StandardError] error object if request failed
4750
+ #
4751
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment]
4752
+ #
4753
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4754
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4755
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4756
+ def create_project_location_agent_environment(parent, google_cloud_dialogflow_v2_environment_object = nil, environment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
4757
+ command = make_simple_command(:post, 'v2/{+parent}/environments', options)
4758
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
4759
+ command.request_object = google_cloud_dialogflow_v2_environment_object
4760
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
4761
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment
4762
+ command.params['parent'] = parent unless parent.nil?
4763
+ command.query['environmentId'] = environment_id unless environment_id.nil?
4764
+ command.query['fields'] = fields unless fields.nil?
4765
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4766
+ execute_or_queue_command(command, &block)
4767
+ end
4768
+
4769
+ # Deletes the specified agent environment.
4770
+ # @param [String] name
4771
+ # Required. The name of the environment to delete. / Format: - `projects//agent/
4772
+ # environments/` - `projects//locations//agent/environments/`
4773
+ # @param [String] fields
4774
+ # Selector specifying which fields to include in a partial response.
4775
+ # @param [String] quota_user
4776
+ # Available to use for quota purposes for server-side applications. Can be any
4777
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4778
+ # @param [Google::Apis::RequestOptions] options
4779
+ # Request-specific options
4780
+ #
4781
+ # @yield [result, err] Result & error if block supplied
4782
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
4783
+ # @yieldparam err [StandardError] error object if request failed
4784
+ #
4785
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
4786
+ #
4787
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4788
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4789
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4790
+ def delete_project_location_agent_environment(name, fields: nil, quota_user: nil, options: nil, &block)
4791
+ command = make_simple_command(:delete, 'v2/{+name}', options)
4792
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
4793
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
4794
+ command.params['name'] = name unless name.nil?
4795
+ command.query['fields'] = fields unless fields.nil?
4796
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4797
+ execute_or_queue_command(command, &block)
4798
+ end
4799
+
4800
+ # Retrieves the specified agent environment.
4801
+ # @param [String] name
4802
+ # Required. The name of the environment. Supported formats: - `projects//agent/
4803
+ # environments/` - `projects//locations//agent/environments/`
4804
+ # @param [String] fields
4805
+ # Selector specifying which fields to include in a partial response.
4806
+ # @param [String] quota_user
4807
+ # Available to use for quota purposes for server-side applications. Can be any
4808
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4809
+ # @param [Google::Apis::RequestOptions] options
4810
+ # Request-specific options
4811
+ #
4812
+ # @yield [result, err] Result & error if block supplied
4813
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] parsed result object
4814
+ # @yieldparam err [StandardError] error object if request failed
4815
+ #
4816
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment]
4817
+ #
4818
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4819
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4820
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4821
+ def get_project_location_agent_environment(name, fields: nil, quota_user: nil, options: nil, &block)
4822
+ command = make_simple_command(:get, 'v2/{+name}', options)
4823
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
4824
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment
4825
+ command.params['name'] = name unless name.nil?
4826
+ command.query['fields'] = fields unless fields.nil?
4827
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4828
+ execute_or_queue_command(command, &block)
4829
+ end
4830
+
4831
+ # Gets the history of the specified environment.
4832
+ # @param [String] parent
4833
+ # Required. The name of the environment to retrieve history for. Supported
4834
+ # formats: - `projects//agent/environments/` - `projects//locations//agent/
4835
+ # environments/`
4836
+ # @param [Fixnum] page_size
4837
+ # Optional. The maximum number of items to return in a single page. By default
4838
+ # 100 and at most 1000.
4839
+ # @param [String] page_token
4840
+ # Optional. The next_page_token value returned from a previous list request.
4841
+ # @param [String] fields
4842
+ # Selector specifying which fields to include in a partial response.
4843
+ # @param [String] quota_user
4844
+ # Available to use for quota purposes for server-side applications. Can be any
4845
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4846
+ # @param [Google::Apis::RequestOptions] options
4847
+ # Request-specific options
4848
+ #
4849
+ # @yield [result, err] Result & error if block supplied
4850
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistory] parsed result object
4851
+ # @yieldparam err [StandardError] error object if request failed
4852
+ #
4853
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistory]
4854
+ #
4855
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4856
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4857
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4858
+ def get_project_location_agent_environment_history(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
4859
+ command = make_simple_command(:get, 'v2/{+parent}/history', options)
4860
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistory::Representation
4861
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistory
4862
+ command.params['parent'] = parent unless parent.nil?
4863
+ command.query['pageSize'] = page_size unless page_size.nil?
4864
+ command.query['pageToken'] = page_token unless page_token.nil?
4865
+ command.query['fields'] = fields unless fields.nil?
4866
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4867
+ execute_or_queue_command(command, &block)
4868
+ end
4869
+
4870
+ # Returns the list of all non-draft environments of the specified agent.
4871
+ # @param [String] parent
4872
+ # Required. The agent to list all environments from. Format: - `projects//agent`
4873
+ # - `projects//locations//agent`
4874
+ # @param [Fixnum] page_size
4360
4875
  # Optional. The maximum number of items to return in a single page. By default
4361
4876
  # 100 and at most 1000.
4362
4877
  # @param [String] page_token
@@ -4390,6 +4905,109 @@ module Google
4390
4905
  execute_or_queue_command(command, &block)
4391
4906
  end
4392
4907
 
4908
+ # Updates the specified agent environment. This method allows you to deploy new
4909
+ # agent versions into the environment. When an environment is pointed to a new
4910
+ # agent version by setting `environment.agent_version`, the environment is
4911
+ # temporarily set to the `LOADING` state. During that time, the environment
4912
+ # keeps on serving the previous version of the agent. After the new agent
4913
+ # version is done loading, the environment is set back to the `RUNNING` state.
4914
+ # You can use "-" as Environment ID in environment name to update version in "
4915
+ # draft" environment. WARNING: this will negate all recent changes to draft and
4916
+ # can't be undone. You may want to save the draft to a version before calling
4917
+ # this function.
4918
+ # @param [String] name
4919
+ # Output only. The unique identifier of this agent environment. Supported
4920
+ # formats: - `projects//agent/environments/` - `projects//locations//agent/
4921
+ # environments/`
4922
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] google_cloud_dialogflow_v2_environment_object
4923
+ # @param [Boolean] allow_load_to_draft_and_discard_changes
4924
+ # Optional. This field is used to prevent accidental overwrite of the draft
4925
+ # environment, which is an operation that cannot be undone. To confirm that the
4926
+ # caller desires this overwrite, this field must be explicitly set to true when
4927
+ # updating the draft environment (environment ID = `-`).
4928
+ # @param [String] update_mask
4929
+ # Required. The mask to control which fields get updated.
4930
+ # @param [String] fields
4931
+ # Selector specifying which fields to include in a partial response.
4932
+ # @param [String] quota_user
4933
+ # Available to use for quota purposes for server-side applications. Can be any
4934
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4935
+ # @param [Google::Apis::RequestOptions] options
4936
+ # Request-specific options
4937
+ #
4938
+ # @yield [result, err] Result & error if block supplied
4939
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment] parsed result object
4940
+ # @yieldparam err [StandardError] error object if request failed
4941
+ #
4942
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment]
4943
+ #
4944
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4945
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4946
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4947
+ def patch_project_location_agent_environment(name, google_cloud_dialogflow_v2_environment_object = nil, allow_load_to_draft_and_discard_changes: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
4948
+ command = make_simple_command(:patch, 'v2/{+name}', options)
4949
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
4950
+ command.request_object = google_cloud_dialogflow_v2_environment_object
4951
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment::Representation
4952
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment
4953
+ command.params['name'] = name unless name.nil?
4954
+ command.query['allowLoadToDraftAndDiscardChanges'] = allow_load_to_draft_and_discard_changes unless allow_load_to_draft_and_discard_changes.nil?
4955
+ command.query['updateMask'] = update_mask unless update_mask.nil?
4956
+ command.query['fields'] = fields unless fields.nil?
4957
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4958
+ execute_or_queue_command(command, &block)
4959
+ end
4960
+
4961
+ # Returns the list of all intents in the specified agent.
4962
+ # @param [String] parent
4963
+ # Required. The agent to list all intents from. Format: `projects//agent` or `
4964
+ # projects//locations//agent`. Alternatively, you can specify the environment to
4965
+ # list intents for. Format: `projects//agent/environments/` or `projects//
4966
+ # locations//agent/environments/`. Note: training phrases of the intents will
4967
+ # not be returned for non-draft environment.
4968
+ # @param [String] intent_view
4969
+ # Optional. The resource view to apply to the returned intent.
4970
+ # @param [String] language_code
4971
+ # Optional. The language used to access language-specific data. If not specified,
4972
+ # the agent's default language is used. For more information, see [Multilingual
4973
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
4974
+ # multilingual#intent-entity).
4975
+ # @param [Fixnum] page_size
4976
+ # Optional. The maximum number of items to return in a single page. By default
4977
+ # 100 and at most 1000.
4978
+ # @param [String] page_token
4979
+ # Optional. The next_page_token value returned from a previous list request.
4980
+ # @param [String] fields
4981
+ # Selector specifying which fields to include in a partial response.
4982
+ # @param [String] quota_user
4983
+ # Available to use for quota purposes for server-side applications. Can be any
4984
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4985
+ # @param [Google::Apis::RequestOptions] options
4986
+ # Request-specific options
4987
+ #
4988
+ # @yield [result, err] Result & error if block supplied
4989
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListIntentsResponse] parsed result object
4990
+ # @yieldparam err [StandardError] error object if request failed
4991
+ #
4992
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListIntentsResponse]
4993
+ #
4994
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4995
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4996
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4997
+ def list_project_location_agent_environment_intents(parent, intent_view: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
4998
+ command = make_simple_command(:get, 'v2/{+parent}/intents', options)
4999
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListIntentsResponse::Representation
5000
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListIntentsResponse
5001
+ command.params['parent'] = parent unless parent.nil?
5002
+ command.query['intentView'] = intent_view unless intent_view.nil?
5003
+ command.query['languageCode'] = language_code unless language_code.nil?
5004
+ command.query['pageSize'] = page_size unless page_size.nil?
5005
+ command.query['pageToken'] = page_token unless page_token.nil?
5006
+ command.query['fields'] = fields unless fields.nil?
5007
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
5008
+ execute_or_queue_command(command, &block)
5009
+ end
5010
+
4393
5011
  # Deletes all active contexts in the specified session.
4394
5012
  # @param [String] parent
4395
5013
  # Required. The name of the session to delete all contexts from. Format: `
@@ -5036,7 +5654,11 @@ module Google
5036
5654
 
5037
5655
  # Returns the list of all intents in the specified agent.
5038
5656
  # @param [String] parent
5039
- # Required. The agent to list all intents from. Format: `projects//agent`.
5657
+ # Required. The agent to list all intents from. Format: `projects//agent` or `
5658
+ # projects//locations//agent`. Alternatively, you can specify the environment to
5659
+ # list intents for. Format: `projects//agent/environments/` or `projects//
5660
+ # locations//agent/environments/`. Note: training phrases of the intents will
5661
+ # not be returned for non-draft environment.
5040
5662
  # @param [String] intent_view
5041
5663
  # Optional. The resource view to apply to the returned intent.
5042
5664
  # @param [String] language_code
@@ -5590,6 +6212,180 @@ module Google
5590
6212
  execute_or_queue_command(command, &block)
5591
6213
  end
5592
6214
 
6215
+ # Creates an agent version. The new version points to the agent instance in the "
6216
+ # default" environment.
6217
+ # @param [String] parent
6218
+ # Required. The agent to create a version for. Supported formats: - `projects//
6219
+ # agent` - `projects//locations//agent`
6220
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] google_cloud_dialogflow_v2_version_object
6221
+ # @param [String] fields
6222
+ # Selector specifying which fields to include in a partial response.
6223
+ # @param [String] quota_user
6224
+ # Available to use for quota purposes for server-side applications. Can be any
6225
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6226
+ # @param [Google::Apis::RequestOptions] options
6227
+ # Request-specific options
6228
+ #
6229
+ # @yield [result, err] Result & error if block supplied
6230
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] parsed result object
6231
+ # @yieldparam err [StandardError] error object if request failed
6232
+ #
6233
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version]
6234
+ #
6235
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6236
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6237
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6238
+ def create_project_location_agent_version(parent, google_cloud_dialogflow_v2_version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
6239
+ command = make_simple_command(:post, 'v2/{+parent}/versions', options)
6240
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
6241
+ command.request_object = google_cloud_dialogflow_v2_version_object
6242
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
6243
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version
6244
+ command.params['parent'] = parent unless parent.nil?
6245
+ command.query['fields'] = fields unless fields.nil?
6246
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6247
+ execute_or_queue_command(command, &block)
6248
+ end
6249
+
6250
+ # Delete the specified agent version.
6251
+ # @param [String] name
6252
+ # Required. The name of the version to delete. Supported formats: - `projects//
6253
+ # agent/versions/` - `projects//locations//agent/versions/`
6254
+ # @param [String] fields
6255
+ # Selector specifying which fields to include in a partial response.
6256
+ # @param [String] quota_user
6257
+ # Available to use for quota purposes for server-side applications. Can be any
6258
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6259
+ # @param [Google::Apis::RequestOptions] options
6260
+ # Request-specific options
6261
+ #
6262
+ # @yield [result, err] Result & error if block supplied
6263
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
6264
+ # @yieldparam err [StandardError] error object if request failed
6265
+ #
6266
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
6267
+ #
6268
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6269
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6270
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6271
+ def delete_project_location_agent_version(name, fields: nil, quota_user: nil, options: nil, &block)
6272
+ command = make_simple_command(:delete, 'v2/{+name}', options)
6273
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
6274
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
6275
+ command.params['name'] = name unless name.nil?
6276
+ command.query['fields'] = fields unless fields.nil?
6277
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6278
+ execute_or_queue_command(command, &block)
6279
+ end
6280
+
6281
+ # Retrieves the specified agent version.
6282
+ # @param [String] name
6283
+ # Required. The name of the version. Supported formats: - `projects//agent/
6284
+ # versions/` - `projects//locations//agent/versions/`
6285
+ # @param [String] fields
6286
+ # Selector specifying which fields to include in a partial response.
6287
+ # @param [String] quota_user
6288
+ # Available to use for quota purposes for server-side applications. Can be any
6289
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6290
+ # @param [Google::Apis::RequestOptions] options
6291
+ # Request-specific options
6292
+ #
6293
+ # @yield [result, err] Result & error if block supplied
6294
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] parsed result object
6295
+ # @yieldparam err [StandardError] error object if request failed
6296
+ #
6297
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version]
6298
+ #
6299
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6300
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6301
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6302
+ def get_project_location_agent_version(name, fields: nil, quota_user: nil, options: nil, &block)
6303
+ command = make_simple_command(:get, 'v2/{+name}', options)
6304
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
6305
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version
6306
+ command.params['name'] = name unless name.nil?
6307
+ command.query['fields'] = fields unless fields.nil?
6308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6309
+ execute_or_queue_command(command, &block)
6310
+ end
6311
+
6312
+ # Returns the list of all versions of the specified agent.
6313
+ # @param [String] parent
6314
+ # Required. The agent to list all versions from. Supported formats: - `projects//
6315
+ # agent` - `projects//locations//agent`
6316
+ # @param [Fixnum] page_size
6317
+ # Optional. The maximum number of items to return in a single page. By default
6318
+ # 100 and at most 1000.
6319
+ # @param [String] page_token
6320
+ # Optional. The next_page_token value returned from a previous list request.
6321
+ # @param [String] fields
6322
+ # Selector specifying which fields to include in a partial response.
6323
+ # @param [String] quota_user
6324
+ # Available to use for quota purposes for server-side applications. Can be any
6325
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6326
+ # @param [Google::Apis::RequestOptions] options
6327
+ # Request-specific options
6328
+ #
6329
+ # @yield [result, err] Result & error if block supplied
6330
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListVersionsResponse] parsed result object
6331
+ # @yieldparam err [StandardError] error object if request failed
6332
+ #
6333
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListVersionsResponse]
6334
+ #
6335
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6336
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6337
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6338
+ def list_project_location_agent_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
6339
+ command = make_simple_command(:get, 'v2/{+parent}/versions', options)
6340
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListVersionsResponse::Representation
6341
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListVersionsResponse
6342
+ command.params['parent'] = parent unless parent.nil?
6343
+ command.query['pageSize'] = page_size unless page_size.nil?
6344
+ command.query['pageToken'] = page_token unless page_token.nil?
6345
+ command.query['fields'] = fields unless fields.nil?
6346
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6347
+ execute_or_queue_command(command, &block)
6348
+ end
6349
+
6350
+ # Updates the specified agent version. Note that this method does not allow you
6351
+ # to update the state of the agent the given version points to. It allows you to
6352
+ # update only mutable properties of the version resource.
6353
+ # @param [String] name
6354
+ # Output only. The unique identifier of this agent version. Supported formats: -
6355
+ # `projects//agent/versions/` - `projects//locations//agent/versions/`
6356
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] google_cloud_dialogflow_v2_version_object
6357
+ # @param [String] update_mask
6358
+ # Required. The mask to control which fields get updated.
6359
+ # @param [String] fields
6360
+ # Selector specifying which fields to include in a partial response.
6361
+ # @param [String] quota_user
6362
+ # Available to use for quota purposes for server-side applications. Can be any
6363
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6364
+ # @param [Google::Apis::RequestOptions] options
6365
+ # Request-specific options
6366
+ #
6367
+ # @yield [result, err] Result & error if block supplied
6368
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version] parsed result object
6369
+ # @yieldparam err [StandardError] error object if request failed
6370
+ #
6371
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version]
6372
+ #
6373
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6374
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6375
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6376
+ def patch_project_location_agent_version(name, google_cloud_dialogflow_v2_version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
6377
+ command = make_simple_command(:patch, 'v2/{+name}', options)
6378
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
6379
+ command.request_object = google_cloud_dialogflow_v2_version_object
6380
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version::Representation
6381
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version
6382
+ command.params['name'] = name unless name.nil?
6383
+ command.query['updateMask'] = update_mask unless update_mask.nil?
6384
+ command.query['fields'] = fields unless fields.nil?
6385
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6386
+ execute_or_queue_command(command, &block)
6387
+ end
6388
+
5593
6389
  # Returns the list of all answer records in the specified project in reverse
5594
6390
  # chronological order.
5595
6391
  # @param [String] parent
@@ -6068,7 +6864,7 @@ module Google
6068
6864
  # Adds a text (chat, for example), or audio (phone recording, for example)
6069
6865
  # message from a participant into the conversation. Note: Always use agent
6070
6866
  # versions for production traffic sent to virtual agents. See [Versions and
6071
- # environments(https://cloud.google.com/dialogflow/es/docs/agents-versions).
6867
+ # environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
6072
6868
  # @param [String] participant
6073
6869
  # Required. The name of the participant this text comes from. Format: `projects//
6074
6870
  # locations//conversations//participants/`.