google-apis-discoveryengine_v1 0.44.0 → 0.45.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.
@@ -759,6 +759,411 @@ module Google
759
759
  end
760
760
  end
761
761
 
762
+ # Request message for CompletionService.AdvancedCompleteQuery method. .
763
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequest
764
+ include Google::Apis::Core::Hashable
765
+
766
+ # Specification to boost suggestions based on the condtion of the suggestion.
767
+ # Corresponds to the JSON property `boostSpec`
768
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestBoostSpec]
769
+ attr_accessor :boost_spec
770
+
771
+ # Optional. Experiment ids for this request.
772
+ # Corresponds to the JSON property `experimentIds`
773
+ # @return [Array<String>]
774
+ attr_accessor :experiment_ids
775
+
776
+ # Indicates if tail suggestions should be returned if there are no suggestions
777
+ # that match the full query. Even if set to true, if there are suggestions that
778
+ # match the full query, those are returned and no tail suggestions are returned.
779
+ # Corresponds to the JSON property `includeTailSuggestions`
780
+ # @return [Boolean]
781
+ attr_accessor :include_tail_suggestions
782
+ alias_method :include_tail_suggestions?, :include_tail_suggestions
783
+
784
+ # Required. The typeahead input used to fetch suggestions. Maximum length is 128
785
+ # characters. The query can not be empty for most of the suggestion types. If it
786
+ # is empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
787
+ # suggestion_types contains only the type `RECENT_SEARCH`, the query can be an
788
+ # empty string. The is called "zero prefix" feature, which returns user's
789
+ # recently searched queries given the empty query.
790
+ # Corresponds to the JSON property `query`
791
+ # @return [String]
792
+ attr_accessor :query
793
+
794
+ # Specifies the autocomplete query model, which only applies to the QUERY
795
+ # SuggestionType. This overrides any model specified in the Configuration >
796
+ # Autocomplete section of the Cloud console. Currently supported values: * `
797
+ # document` - Using suggestions generated from user-imported documents. * `
798
+ # search-history` - Using suggestions generated from the past history of
799
+ # SearchService.Search API calls. Do not use it when there is no traffic for
800
+ # Search API. * `user-event` - Using suggestions generated from user-imported
801
+ # search events. * `document-completable` - Using suggestions taken directly
802
+ # from user-imported document fields marked as completable. Default values: * `
803
+ # document` is the default model for regular dataStores. * `search-history` is
804
+ # the default model for site search dataStores.
805
+ # Corresponds to the JSON property `queryModel`
806
+ # @return [String]
807
+ attr_accessor :query_model
808
+
809
+ # Optional. Specification of each suggestion type.
810
+ # Corresponds to the JSON property `suggestionTypeSpecs`
811
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestSuggestionTypeSpec>]
812
+ attr_accessor :suggestion_type_specs
813
+
814
+ # Optional. Suggestion types to return. If empty or unspecified, query
815
+ # suggestions are returned. Only one suggestion type is supported at the moment.
816
+ # Corresponds to the JSON property `suggestionTypes`
817
+ # @return [Array<String>]
818
+ attr_accessor :suggestion_types
819
+
820
+ # Information of an end user.
821
+ # Corresponds to the JSON property `userInfo`
822
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1UserInfo]
823
+ attr_accessor :user_info
824
+
825
+ # A unique identifier for tracking visitors. For example, this could be
826
+ # implemented with an HTTP cookie, which should be able to uniquely identify a
827
+ # visitor on a single device. This unique identifier should not change if the
828
+ # visitor logs in or out of the website. This field should NOT have a fixed
829
+ # value such as `unknown_visitor`. This should be the same identifier as
830
+ # UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a
831
+ # UTF-8 encoded string with a length limit of 128
832
+ # Corresponds to the JSON property `userPseudoId`
833
+ # @return [String]
834
+ attr_accessor :user_pseudo_id
835
+
836
+ def initialize(**args)
837
+ update!(**args)
838
+ end
839
+
840
+ # Update properties of this object
841
+ def update!(**args)
842
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
843
+ @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids)
844
+ @include_tail_suggestions = args[:include_tail_suggestions] if args.key?(:include_tail_suggestions)
845
+ @query = args[:query] if args.key?(:query)
846
+ @query_model = args[:query_model] if args.key?(:query_model)
847
+ @suggestion_type_specs = args[:suggestion_type_specs] if args.key?(:suggestion_type_specs)
848
+ @suggestion_types = args[:suggestion_types] if args.key?(:suggestion_types)
849
+ @user_info = args[:user_info] if args.key?(:user_info)
850
+ @user_pseudo_id = args[:user_pseudo_id] if args.key?(:user_pseudo_id)
851
+ end
852
+ end
853
+
854
+ # Specification to boost suggestions based on the condtion of the suggestion.
855
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestBoostSpec
856
+ include Google::Apis::Core::Hashable
857
+
858
+ # Condition boost specifications. If a suggestion matches multiple conditions in
859
+ # the specifications, boost values from these specifications are all applied and
860
+ # combined in a non-linear way. Maximum number of specifications is 20. Note:
861
+ # Currently only support language condition boost.
862
+ # Corresponds to the JSON property `conditionBoostSpecs`
863
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestBoostSpecConditionBoostSpec>]
864
+ attr_accessor :condition_boost_specs
865
+
866
+ def initialize(**args)
867
+ update!(**args)
868
+ end
869
+
870
+ # Update properties of this object
871
+ def update!(**args)
872
+ @condition_boost_specs = args[:condition_boost_specs] if args.key?(:condition_boost_specs)
873
+ end
874
+ end
875
+
876
+ # Boost applies to suggestions which match a condition.
877
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestBoostSpecConditionBoostSpec
878
+ include Google::Apis::Core::Hashable
879
+
880
+ # Strength of the boost, which should be in [-1, 1]. Negative boost means
881
+ # demotion. Default is 0.0. Setting to 1.0 gives the suggestions a big promotion.
882
+ # However, it does not necessarily mean that the top result will be a boosted
883
+ # suggestion. Setting to -1.0 gives the suggestions a big demotion. However,
884
+ # other suggestions that are relevant might still be shown. Setting to 0.0 means
885
+ # no boost applied. The boosting condition is ignored.
886
+ # Corresponds to the JSON property `boost`
887
+ # @return [Float]
888
+ attr_accessor :boost
889
+
890
+ # An expression which specifies a boost condition. The syntax is the same as [
891
+ # filter expression syntax](https://cloud.google.com/generative-ai-app-builder/
892
+ # docs/filter-search-metadata#filter-expression-syntax). Currently, the only
893
+ # supported condition is a list of BCP-47 lang codes. Example: * To boost
894
+ # suggestions in languages `en` or `fr`: `(lang_code: ANY("en", "fr"))`
895
+ # Corresponds to the JSON property `condition`
896
+ # @return [String]
897
+ attr_accessor :condition
898
+
899
+ def initialize(**args)
900
+ update!(**args)
901
+ end
902
+
903
+ # Update properties of this object
904
+ def update!(**args)
905
+ @boost = args[:boost] if args.key?(:boost)
906
+ @condition = args[:condition] if args.key?(:condition)
907
+ end
908
+ end
909
+
910
+ # Specification of each suggestion type.
911
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryRequestSuggestionTypeSpec
912
+ include Google::Apis::Core::Hashable
913
+
914
+ # Optional. Maximum number of suggestions to return for each suggestion type.
915
+ # Corresponds to the JSON property `maxSuggestions`
916
+ # @return [Fixnum]
917
+ attr_accessor :max_suggestions
918
+
919
+ # Optional. Suggestion type.
920
+ # Corresponds to the JSON property `suggestionType`
921
+ # @return [String]
922
+ attr_accessor :suggestion_type
923
+
924
+ def initialize(**args)
925
+ update!(**args)
926
+ end
927
+
928
+ # Update properties of this object
929
+ def update!(**args)
930
+ @max_suggestions = args[:max_suggestions] if args.key?(:max_suggestions)
931
+ @suggestion_type = args[:suggestion_type] if args.key?(:suggestion_type)
932
+ end
933
+ end
934
+
935
+ # Response message for CompletionService.AdvancedCompleteQuery method.
936
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponse
937
+ include Google::Apis::Core::Hashable
938
+
939
+ # Results of the matched content suggestions. The result list is ordered and the
940
+ # first result is the top suggestion.
941
+ # Corresponds to the JSON property `contentSuggestions`
942
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion>]
943
+ attr_accessor :content_suggestions
944
+
945
+ # Results of the matched people suggestions. The result list is ordered and the
946
+ # first result is the top suggestion.
947
+ # Corresponds to the JSON property `peopleSuggestions`
948
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion>]
949
+ attr_accessor :people_suggestions
950
+
951
+ # Results of the matched query suggestions. The result list is ordered and the
952
+ # first result is a top suggestion.
953
+ # Corresponds to the JSON property `querySuggestions`
954
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseQuerySuggestion>]
955
+ attr_accessor :query_suggestions
956
+
957
+ # Results of the matched "recent search" suggestions. The result list is ordered
958
+ # and the first result is the top suggestion.
959
+ # Corresponds to the JSON property `recentSearchSuggestions`
960
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion>]
961
+ attr_accessor :recent_search_suggestions
962
+
963
+ # True if the returned suggestions are all tail suggestions. For tail matching
964
+ # to be triggered, include_tail_suggestions in the request must be true and
965
+ # there must be no suggestions that match the full query.
966
+ # Corresponds to the JSON property `tailMatchTriggered`
967
+ # @return [Boolean]
968
+ attr_accessor :tail_match_triggered
969
+ alias_method :tail_match_triggered?, :tail_match_triggered
970
+
971
+ def initialize(**args)
972
+ update!(**args)
973
+ end
974
+
975
+ # Update properties of this object
976
+ def update!(**args)
977
+ @content_suggestions = args[:content_suggestions] if args.key?(:content_suggestions)
978
+ @people_suggestions = args[:people_suggestions] if args.key?(:people_suggestions)
979
+ @query_suggestions = args[:query_suggestions] if args.key?(:query_suggestions)
980
+ @recent_search_suggestions = args[:recent_search_suggestions] if args.key?(:recent_search_suggestions)
981
+ @tail_match_triggered = args[:tail_match_triggered] if args.key?(:tail_match_triggered)
982
+ end
983
+ end
984
+
985
+ # Suggestions as content.
986
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseContentSuggestion
987
+ include Google::Apis::Core::Hashable
988
+
989
+ # The type of the content suggestion.
990
+ # Corresponds to the JSON property `contentType`
991
+ # @return [String]
992
+ attr_accessor :content_type
993
+
994
+ # The name of the dataStore that this suggestion belongs to.
995
+ # Corresponds to the JSON property `dataStore`
996
+ # @return [String]
997
+ attr_accessor :data_store
998
+
999
+ # The destination uri of the content suggestion.
1000
+ # Corresponds to the JSON property `destinationUri`
1001
+ # @return [String]
1002
+ attr_accessor :destination_uri
1003
+
1004
+ # Document captures all raw metadata information of items to be recommended or
1005
+ # searched.
1006
+ # Corresponds to the JSON property `document`
1007
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Document]
1008
+ attr_accessor :document
1009
+
1010
+ # The icon uri of the content suggestion.
1011
+ # Corresponds to the JSON property `iconUri`
1012
+ # @return [String]
1013
+ attr_accessor :icon_uri
1014
+
1015
+ # The score of each suggestion. The score is in the range of [0, 1].
1016
+ # Corresponds to the JSON property `score`
1017
+ # @return [Float]
1018
+ attr_accessor :score
1019
+
1020
+ # The suggestion for the query.
1021
+ # Corresponds to the JSON property `suggestion`
1022
+ # @return [String]
1023
+ attr_accessor :suggestion
1024
+
1025
+ def initialize(**args)
1026
+ update!(**args)
1027
+ end
1028
+
1029
+ # Update properties of this object
1030
+ def update!(**args)
1031
+ @content_type = args[:content_type] if args.key?(:content_type)
1032
+ @data_store = args[:data_store] if args.key?(:data_store)
1033
+ @destination_uri = args[:destination_uri] if args.key?(:destination_uri)
1034
+ @document = args[:document] if args.key?(:document)
1035
+ @icon_uri = args[:icon_uri] if args.key?(:icon_uri)
1036
+ @score = args[:score] if args.key?(:score)
1037
+ @suggestion = args[:suggestion] if args.key?(:suggestion)
1038
+ end
1039
+ end
1040
+
1041
+ # Suggestions as people.
1042
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponsePersonSuggestion
1043
+ include Google::Apis::Core::Hashable
1044
+
1045
+ # The name of the dataStore that this suggestion belongs to.
1046
+ # Corresponds to the JSON property `dataStore`
1047
+ # @return [String]
1048
+ attr_accessor :data_store
1049
+
1050
+ # The destination uri of the person suggestion.
1051
+ # Corresponds to the JSON property `destinationUri`
1052
+ # @return [String]
1053
+ attr_accessor :destination_uri
1054
+
1055
+ # The photo uri of the person suggestion.
1056
+ # Corresponds to the JSON property `displayPhotoUri`
1057
+ # @return [String]
1058
+ attr_accessor :display_photo_uri
1059
+
1060
+ # Document captures all raw metadata information of items to be recommended or
1061
+ # searched.
1062
+ # Corresponds to the JSON property `document`
1063
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Document]
1064
+ attr_accessor :document
1065
+
1066
+ # The type of the person.
1067
+ # Corresponds to the JSON property `personType`
1068
+ # @return [String]
1069
+ attr_accessor :person_type
1070
+
1071
+ # The score of each suggestion. The score is in the range of [0, 1].
1072
+ # Corresponds to the JSON property `score`
1073
+ # @return [Float]
1074
+ attr_accessor :score
1075
+
1076
+ # The suggestion for the query.
1077
+ # Corresponds to the JSON property `suggestion`
1078
+ # @return [String]
1079
+ attr_accessor :suggestion
1080
+
1081
+ def initialize(**args)
1082
+ update!(**args)
1083
+ end
1084
+
1085
+ # Update properties of this object
1086
+ def update!(**args)
1087
+ @data_store = args[:data_store] if args.key?(:data_store)
1088
+ @destination_uri = args[:destination_uri] if args.key?(:destination_uri)
1089
+ @display_photo_uri = args[:display_photo_uri] if args.key?(:display_photo_uri)
1090
+ @document = args[:document] if args.key?(:document)
1091
+ @person_type = args[:person_type] if args.key?(:person_type)
1092
+ @score = args[:score] if args.key?(:score)
1093
+ @suggestion = args[:suggestion] if args.key?(:suggestion)
1094
+ end
1095
+ end
1096
+
1097
+ # Suggestions as search queries.
1098
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseQuerySuggestion
1099
+ include Google::Apis::Core::Hashable
1100
+
1101
+ # The unique document field paths that serve as the source of this suggestion if
1102
+ # it was generated from completable fields. This field is only populated for the
1103
+ # document-completable model.
1104
+ # Corresponds to the JSON property `completableFieldPaths`
1105
+ # @return [Array<String>]
1106
+ attr_accessor :completable_field_paths
1107
+
1108
+ # The name of the dataStore that this suggestion belongs to.
1109
+ # Corresponds to the JSON property `dataStore`
1110
+ # @return [Array<String>]
1111
+ attr_accessor :data_store
1112
+
1113
+ # The score of each suggestion. The score is in the range of [0, 1].
1114
+ # Corresponds to the JSON property `score`
1115
+ # @return [Float]
1116
+ attr_accessor :score
1117
+
1118
+ # The suggestion for the query.
1119
+ # Corresponds to the JSON property `suggestion`
1120
+ # @return [String]
1121
+ attr_accessor :suggestion
1122
+
1123
+ def initialize(**args)
1124
+ update!(**args)
1125
+ end
1126
+
1127
+ # Update properties of this object
1128
+ def update!(**args)
1129
+ @completable_field_paths = args[:completable_field_paths] if args.key?(:completable_field_paths)
1130
+ @data_store = args[:data_store] if args.key?(:data_store)
1131
+ @score = args[:score] if args.key?(:score)
1132
+ @suggestion = args[:suggestion] if args.key?(:suggestion)
1133
+ end
1134
+ end
1135
+
1136
+ # Suggestions from recent search history.
1137
+ class GoogleCloudDiscoveryengineV1AdvancedCompleteQueryResponseRecentSearchSuggestion
1138
+ include Google::Apis::Core::Hashable
1139
+
1140
+ # The time when this recent rearch happened.
1141
+ # Corresponds to the JSON property `recentSearchTime`
1142
+ # @return [String]
1143
+ attr_accessor :recent_search_time
1144
+
1145
+ # The score of each suggestion. The score is in the range of [0, 1].
1146
+ # Corresponds to the JSON property `score`
1147
+ # @return [Float]
1148
+ attr_accessor :score
1149
+
1150
+ # The suggestion for the query.
1151
+ # Corresponds to the JSON property `suggestion`
1152
+ # @return [String]
1153
+ attr_accessor :suggestion
1154
+
1155
+ def initialize(**args)
1156
+ update!(**args)
1157
+ end
1158
+
1159
+ # Update properties of this object
1160
+ def update!(**args)
1161
+ @recent_search_time = args[:recent_search_time] if args.key?(:recent_search_time)
1162
+ @score = args[:score] if args.key?(:score)
1163
+ @suggestion = args[:suggestion] if args.key?(:suggestion)
1164
+ end
1165
+ end
1166
+
762
1167
  # Configuration data for advance site search.
763
1168
  class GoogleCloudDiscoveryengineV1AdvancedSiteSearchConfig
764
1169
  include Google::Apis::Core::Hashable
@@ -2462,19 +2867,389 @@ module Google
2462
2867
  end
2463
2868
  end
2464
2869
 
2465
- # Snippet information.
2466
- class GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo
2467
- include Google::Apis::Core::Hashable
2870
+ # Snippet information.
2871
+ class GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo
2872
+ include Google::Apis::Core::Hashable
2873
+
2874
+ # Snippet content.
2875
+ # Corresponds to the JSON property `snippet`
2876
+ # @return [String]
2877
+ attr_accessor :snippet
2878
+
2879
+ # Status of the snippet defined by the search team.
2880
+ # Corresponds to the JSON property `snippetStatus`
2881
+ # @return [String]
2882
+ attr_accessor :snippet_status
2883
+
2884
+ def initialize(**args)
2885
+ update!(**args)
2886
+ end
2887
+
2888
+ # Update properties of this object
2889
+ def update!(**args)
2890
+ @snippet = args[:snippet] if args.key?(:snippet)
2891
+ @snippet_status = args[:snippet_status] if args.key?(:snippet_status)
2892
+ end
2893
+ end
2894
+
2895
+ # Search action.
2896
+ class GoogleCloudDiscoveryengineV1AnswerStepActionSearchAction
2897
+ include Google::Apis::Core::Hashable
2898
+
2899
+ # The query to search.
2900
+ # Corresponds to the JSON property `query`
2901
+ # @return [String]
2902
+ attr_accessor :query
2903
+
2904
+ def initialize(**args)
2905
+ update!(**args)
2906
+ end
2907
+
2908
+ # Update properties of this object
2909
+ def update!(**args)
2910
+ @query = args[:query] if args.key?(:query)
2911
+ end
2912
+ end
2913
+
2914
+ # AssistAnswer resource, main part of AssistResponse.
2915
+ class GoogleCloudDiscoveryengineV1AssistAnswer
2916
+ include Google::Apis::Core::Hashable
2917
+
2918
+ # Reasons for not answering the assist call.
2919
+ # Corresponds to the JSON property `assistSkippedReasons`
2920
+ # @return [Array<String>]
2921
+ attr_accessor :assist_skipped_reasons
2922
+
2923
+ # Replies of the assistant.
2924
+ # Corresponds to the JSON property `replies`
2925
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistAnswerReply>]
2926
+ attr_accessor :replies
2927
+
2928
+ # State of the answer generation.
2929
+ # Corresponds to the JSON property `state`
2930
+ # @return [String]
2931
+ attr_accessor :state
2932
+
2933
+ def initialize(**args)
2934
+ update!(**args)
2935
+ end
2936
+
2937
+ # Update properties of this object
2938
+ def update!(**args)
2939
+ @assist_skipped_reasons = args[:assist_skipped_reasons] if args.key?(:assist_skipped_reasons)
2940
+ @replies = args[:replies] if args.key?(:replies)
2941
+ @state = args[:state] if args.key?(:state)
2942
+ end
2943
+ end
2944
+
2945
+ # One part of the multi-part response of the assist call.
2946
+ class GoogleCloudDiscoveryengineV1AssistAnswerReply
2947
+ include Google::Apis::Core::Hashable
2948
+
2949
+ # A piece of content and possibly its grounding information. Not all content
2950
+ # needs grounding. Phrases like "Of course, I will gladly search it for you." do
2951
+ # not need grounding.
2952
+ # Corresponds to the JSON property `groundedContent`
2953
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantGroundedContent]
2954
+ attr_accessor :grounded_content
2955
+
2956
+ def initialize(**args)
2957
+ update!(**args)
2958
+ end
2959
+
2960
+ # Update properties of this object
2961
+ def update!(**args)
2962
+ @grounded_content = args[:grounded_content] if args.key?(:grounded_content)
2963
+ end
2964
+ end
2965
+
2966
+ # User metadata of the request.
2967
+ class GoogleCloudDiscoveryengineV1AssistUserMetadata
2968
+ include Google::Apis::Core::Hashable
2969
+
2970
+ # Optional. Preferred language to be used for answering if language detection
2971
+ # fails. Also used as the language of error messages created by actions,
2972
+ # regardless of language detection results.
2973
+ # Corresponds to the JSON property `preferredLanguageCode`
2974
+ # @return [String]
2975
+ attr_accessor :preferred_language_code
2976
+
2977
+ # Optional. IANA time zone, e.g. Europe/Budapest.
2978
+ # Corresponds to the JSON property `timeZone`
2979
+ # @return [String]
2980
+ attr_accessor :time_zone
2981
+
2982
+ def initialize(**args)
2983
+ update!(**args)
2984
+ end
2985
+
2986
+ # Update properties of this object
2987
+ def update!(**args)
2988
+ @preferred_language_code = args[:preferred_language_code] if args.key?(:preferred_language_code)
2989
+ @time_zone = args[:time_zone] if args.key?(:time_zone)
2990
+ end
2991
+ end
2992
+
2993
+ # Multi-modal content.
2994
+ class GoogleCloudDiscoveryengineV1AssistantContent
2995
+ include Google::Apis::Core::Hashable
2996
+
2997
+ # Result of executing ExecutableCode.
2998
+ # Corresponds to the JSON property `codeExecutionResult`
2999
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantContentCodeExecutionResult]
3000
+ attr_accessor :code_execution_result
3001
+
3002
+ # Code generated by the model that is meant to be executed by the model.
3003
+ # Corresponds to the JSON property `executableCode`
3004
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantContentExecutableCode]
3005
+ attr_accessor :executable_code
3006
+
3007
+ # A file, e.g., an audio summary.
3008
+ # Corresponds to the JSON property `file`
3009
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantContentFile]
3010
+ attr_accessor :file
3011
+
3012
+ # Inline blob.
3013
+ # Corresponds to the JSON property `inlineData`
3014
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantContentBlob]
3015
+ attr_accessor :inline_data
3016
+
3017
+ # The producer of the content. Can be "model" or "user".
3018
+ # Corresponds to the JSON property `role`
3019
+ # @return [String]
3020
+ attr_accessor :role
3021
+
3022
+ # Inline text.
3023
+ # Corresponds to the JSON property `text`
3024
+ # @return [String]
3025
+ attr_accessor :text
3026
+
3027
+ # Optional. Indicates if the part is thought from the model.
3028
+ # Corresponds to the JSON property `thought`
3029
+ # @return [Boolean]
3030
+ attr_accessor :thought
3031
+ alias_method :thought?, :thought
3032
+
3033
+ def initialize(**args)
3034
+ update!(**args)
3035
+ end
3036
+
3037
+ # Update properties of this object
3038
+ def update!(**args)
3039
+ @code_execution_result = args[:code_execution_result] if args.key?(:code_execution_result)
3040
+ @executable_code = args[:executable_code] if args.key?(:executable_code)
3041
+ @file = args[:file] if args.key?(:file)
3042
+ @inline_data = args[:inline_data] if args.key?(:inline_data)
3043
+ @role = args[:role] if args.key?(:role)
3044
+ @text = args[:text] if args.key?(:text)
3045
+ @thought = args[:thought] if args.key?(:thought)
3046
+ end
3047
+ end
3048
+
3049
+ # Inline blob.
3050
+ class GoogleCloudDiscoveryengineV1AssistantContentBlob
3051
+ include Google::Apis::Core::Hashable
3052
+
3053
+ # Required. Raw bytes.
3054
+ # Corresponds to the JSON property `data`
3055
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
3056
+ # @return [String]
3057
+ attr_accessor :data
3058
+
3059
+ # Required. The media type (MIME type) of the generated data.
3060
+ # Corresponds to the JSON property `mimeType`
3061
+ # @return [String]
3062
+ attr_accessor :mime_type
3063
+
3064
+ def initialize(**args)
3065
+ update!(**args)
3066
+ end
3067
+
3068
+ # Update properties of this object
3069
+ def update!(**args)
3070
+ @data = args[:data] if args.key?(:data)
3071
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
3072
+ end
3073
+ end
3074
+
3075
+ # Result of executing ExecutableCode.
3076
+ class GoogleCloudDiscoveryengineV1AssistantContentCodeExecutionResult
3077
+ include Google::Apis::Core::Hashable
3078
+
3079
+ # Required. Outcome of the code execution.
3080
+ # Corresponds to the JSON property `outcome`
3081
+ # @return [String]
3082
+ attr_accessor :outcome
3083
+
3084
+ # Optional. Contains stdout when code execution is successful, stderr or other
3085
+ # description otherwise.
3086
+ # Corresponds to the JSON property `output`
3087
+ # @return [String]
3088
+ attr_accessor :output
3089
+
3090
+ def initialize(**args)
3091
+ update!(**args)
3092
+ end
3093
+
3094
+ # Update properties of this object
3095
+ def update!(**args)
3096
+ @outcome = args[:outcome] if args.key?(:outcome)
3097
+ @output = args[:output] if args.key?(:output)
3098
+ end
3099
+ end
3100
+
3101
+ # Code generated by the model that is meant to be executed by the model.
3102
+ class GoogleCloudDiscoveryengineV1AssistantContentExecutableCode
3103
+ include Google::Apis::Core::Hashable
3104
+
3105
+ # Required. The code content. Currently only supports Python.
3106
+ # Corresponds to the JSON property `code`
3107
+ # @return [String]
3108
+ attr_accessor :code
3109
+
3110
+ def initialize(**args)
3111
+ update!(**args)
3112
+ end
3113
+
3114
+ # Update properties of this object
3115
+ def update!(**args)
3116
+ @code = args[:code] if args.key?(:code)
3117
+ end
3118
+ end
3119
+
3120
+ # A file, e.g., an audio summary.
3121
+ class GoogleCloudDiscoveryengineV1AssistantContentFile
3122
+ include Google::Apis::Core::Hashable
3123
+
3124
+ # Required. The file ID.
3125
+ # Corresponds to the JSON property `fileId`
3126
+ # @return [String]
3127
+ attr_accessor :file_id
3128
+
3129
+ # Required. The media type (MIME type) of the file.
3130
+ # Corresponds to the JSON property `mimeType`
3131
+ # @return [String]
3132
+ attr_accessor :mime_type
3133
+
3134
+ def initialize(**args)
3135
+ update!(**args)
3136
+ end
3137
+
3138
+ # Update properties of this object
3139
+ def update!(**args)
3140
+ @file_id = args[:file_id] if args.key?(:file_id)
3141
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
3142
+ end
3143
+ end
3144
+
3145
+ # A piece of content and possibly its grounding information. Not all content
3146
+ # needs grounding. Phrases like "Of course, I will gladly search it for you." do
3147
+ # not need grounding.
3148
+ class GoogleCloudDiscoveryengineV1AssistantGroundedContent
3149
+ include Google::Apis::Core::Hashable
3150
+
3151
+ # Multi-modal content.
3152
+ # Corresponds to the JSON property `content`
3153
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantContent]
3154
+ attr_accessor :content
3155
+
3156
+ # Grounding details for text sources.
3157
+ # Corresponds to the JSON property `textGroundingMetadata`
3158
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata]
3159
+ attr_accessor :text_grounding_metadata
3160
+
3161
+ def initialize(**args)
3162
+ update!(**args)
3163
+ end
3164
+
3165
+ # Update properties of this object
3166
+ def update!(**args)
3167
+ @content = args[:content] if args.key?(:content)
3168
+ @text_grounding_metadata = args[:text_grounding_metadata] if args.key?(:text_grounding_metadata)
3169
+ end
3170
+ end
3171
+
3172
+ # Grounding details for text sources.
3173
+ class GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadata
3174
+ include Google::Apis::Core::Hashable
3175
+
3176
+ # References for the grounded text.
3177
+ # Corresponds to the JSON property `references`
3178
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataReference>]
3179
+ attr_accessor :references
3180
+
3181
+ # Grounding information for parts of the text.
3182
+ # Corresponds to the JSON property `segments`
3183
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment>]
3184
+ attr_accessor :segments
3185
+
3186
+ def initialize(**args)
3187
+ update!(**args)
3188
+ end
3189
+
3190
+ # Update properties of this object
3191
+ def update!(**args)
3192
+ @references = args[:references] if args.key?(:references)
3193
+ @segments = args[:segments] if args.key?(:segments)
3194
+ end
3195
+ end
3196
+
3197
+ # Referenced content and related document metadata.
3198
+ class GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataReference
3199
+ include Google::Apis::Core::Hashable
3200
+
3201
+ # Referenced text content.
3202
+ # Corresponds to the JSON property `content`
3203
+ # @return [String]
3204
+ attr_accessor :content
3205
+
3206
+ # Document metadata.
3207
+ # Corresponds to the JSON property `documentMetadata`
3208
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataReferenceDocumentMetadata]
3209
+ attr_accessor :document_metadata
3210
+
3211
+ def initialize(**args)
3212
+ update!(**args)
3213
+ end
3214
+
3215
+ # Update properties of this object
3216
+ def update!(**args)
3217
+ @content = args[:content] if args.key?(:content)
3218
+ @document_metadata = args[:document_metadata] if args.key?(:document_metadata)
3219
+ end
3220
+ end
3221
+
3222
+ # Document metadata.
3223
+ class GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataReferenceDocumentMetadata
3224
+ include Google::Apis::Core::Hashable
3225
+
3226
+ # Document resource name.
3227
+ # Corresponds to the JSON property `document`
3228
+ # @return [String]
3229
+ attr_accessor :document
3230
+
3231
+ # Domain name from the document URI. Note that the `uri` field may contain a URL
3232
+ # that redirects to the actual website, in which case this will contain the
3233
+ # domain name of the target site.
3234
+ # Corresponds to the JSON property `domain`
3235
+ # @return [String]
3236
+ attr_accessor :domain
2468
3237
 
2469
- # Snippet content.
2470
- # Corresponds to the JSON property `snippet`
3238
+ # Page identifier.
3239
+ # Corresponds to the JSON property `pageIdentifier`
2471
3240
  # @return [String]
2472
- attr_accessor :snippet
3241
+ attr_accessor :page_identifier
2473
3242
 
2474
- # Status of the snippet defined by the search team.
2475
- # Corresponds to the JSON property `snippetStatus`
3243
+ # Title.
3244
+ # Corresponds to the JSON property `title`
2476
3245
  # @return [String]
2477
- attr_accessor :snippet_status
3246
+ attr_accessor :title
3247
+
3248
+ # URI for the document. It may contain a URL that redirects to the actual
3249
+ # website.
3250
+ # Corresponds to the JSON property `uri`
3251
+ # @return [String]
3252
+ attr_accessor :uri
2478
3253
 
2479
3254
  def initialize(**args)
2480
3255
  update!(**args)
@@ -2482,19 +3257,44 @@ module Google
2482
3257
 
2483
3258
  # Update properties of this object
2484
3259
  def update!(**args)
2485
- @snippet = args[:snippet] if args.key?(:snippet)
2486
- @snippet_status = args[:snippet_status] if args.key?(:snippet_status)
3260
+ @document = args[:document] if args.key?(:document)
3261
+ @domain = args[:domain] if args.key?(:domain)
3262
+ @page_identifier = args[:page_identifier] if args.key?(:page_identifier)
3263
+ @title = args[:title] if args.key?(:title)
3264
+ @uri = args[:uri] if args.key?(:uri)
2487
3265
  end
2488
3266
  end
2489
3267
 
2490
- # Search action.
2491
- class GoogleCloudDiscoveryengineV1AnswerStepActionSearchAction
3268
+ # Grounding information for a segment of the text.
3269
+ class GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetadataSegment
2492
3270
  include Google::Apis::Core::Hashable
2493
3271
 
2494
- # The query to search.
2495
- # Corresponds to the JSON property `query`
3272
+ # End of the segment, exclusive.
3273
+ # Corresponds to the JSON property `endIndex`
3274
+ # @return [Fixnum]
3275
+ attr_accessor :end_index
3276
+
3277
+ # Score for the segment.
3278
+ # Corresponds to the JSON property `groundingScore`
3279
+ # @return [Float]
3280
+ attr_accessor :grounding_score
3281
+
3282
+ # References for the segment.
3283
+ # Corresponds to the JSON property `referenceIndices`
3284
+ # @return [Array<Fixnum>]
3285
+ attr_accessor :reference_indices
3286
+
3287
+ # Zero-based index indicating the start of the segment, measured in bytes of a
3288
+ # UTF-8 string (i.e. characters encoded on multiple bytes have a length of more
3289
+ # than one).
3290
+ # Corresponds to the JSON property `startIndex`
3291
+ # @return [Fixnum]
3292
+ attr_accessor :start_index
3293
+
3294
+ # The text segment itself.
3295
+ # Corresponds to the JSON property `text`
2496
3296
  # @return [String]
2497
- attr_accessor :query
3297
+ attr_accessor :text
2498
3298
 
2499
3299
  def initialize(**args)
2500
3300
  update!(**args)
@@ -2502,7 +3302,11 @@ module Google
2502
3302
 
2503
3303
  # Update properties of this object
2504
3304
  def update!(**args)
2505
- @query = args[:query] if args.key?(:query)
3305
+ @end_index = args[:end_index] if args.key?(:end_index)
3306
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
3307
+ @reference_indices = args[:reference_indices] if args.key?(:reference_indices)
3308
+ @start_index = args[:start_index] if args.key?(:start_index)
3309
+ @text = args[:text] if args.key?(:text)
2506
3310
  end
2507
3311
  end
2508
3312
 
@@ -5528,6 +6332,13 @@ module Google
5528
6332
  class GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig
5529
6333
  include Google::Apis::Core::Hashable
5530
6334
 
6335
+ # Optional. If true, the processed document will be made available for the
6336
+ # GetProcessedDocument API.
6337
+ # Corresponds to the JSON property `enableGetProcessedDocument`
6338
+ # @return [Boolean]
6339
+ attr_accessor :enable_get_processed_document
6340
+ alias_method :enable_get_processed_document?, :enable_get_processed_document
6341
+
5531
6342
  # Optional. If true, the LLM based annotation is added to the image during
5532
6343
  # parsing.
5533
6344
  # Corresponds to the JSON property `enableImageAnnotation`
@@ -5569,6 +6380,7 @@ module Google
5569
6380
 
5570
6381
  # Update properties of this object
5571
6382
  def update!(**args)
6383
+ @enable_get_processed_document = args[:enable_get_processed_document] if args.key?(:enable_get_processed_document)
5572
6384
  @enable_image_annotation = args[:enable_image_annotation] if args.key?(:enable_image_annotation)
5573
6385
  @enable_table_annotation = args[:enable_table_annotation] if args.key?(:enable_table_annotation)
5574
6386
  @exclude_html_classes = args[:exclude_html_classes] if args.key?(:exclude_html_classes)
@@ -5730,7 +6542,8 @@ module Google
5730
6542
  # Supported keys: * `*`: all features, if it's present, all other feature state
5731
6543
  # settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-
5732
6544
  # gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-
5733
- # org-chart` * `bi-directional-audio` * `feedback` * `session-sharing`
6545
+ # org-chart` * `bi-directional-audio` * `feedback` * `session-sharing` * `
6546
+ # personalization-memory` - Enables personalization based on user preferences.
5734
6547
  # Corresponds to the JSON property `features`
5735
6548
  # @return [Hash<String,String>]
5736
6549
  attr_accessor :features
@@ -6782,7 +7595,7 @@ module Google
6782
7595
  # GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an
6783
7596
  # INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema
6784
7597
  # must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. *
6785
- # SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.
7598
+ # SpannerSource. * CloudSqlSource. * BigtableSource.
6786
7599
  # Corresponds to the JSON property `idField`
6787
7600
  # @return [String]
6788
7601
  attr_accessor :id_field
@@ -8980,21 +9793,17 @@ module Google
8980
9793
 
8981
9794
  # The session resource name. Optional. Session allows users to do multi-turn /
8982
9795
  # search API calls or coordination between /search API calls and /answer API
8983
- # calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the
8984
- # auto-session mode (see below). 2. Call /search API with the session ID
8985
- # generated in the first call. Here, the previous search query gets considered
8986
- # in query standing. I.e., if the first query is "How did Alphabet do in 2022?"
8987
- # and the current query is "How about 2023?", the current query will be
8988
- # interpreted as "How did Alphabet do in 2023?". Example #2 (coordination
8989
- # between /search API calls and /answer API calls): 1. Call /search API with the
8990
- # auto-session mode (see below). 2. Call /answer API with the session ID
8991
- # generated in the first call. Here, the answer generation happens in the
8992
- # context of the search results from the first search call. Auto-session mode:
8993
- # when `projects/.../sessions/-` is used, a new session gets automatically
8994
- # created. Otherwise, users can use the create-session API to create a session
8995
- # manually. Multi-turn Search feature is currently at private GA stage. Please
8996
- # use v1alpha or v1beta version instead before we launch this feature to public
8997
- # GA. Or ask for allowlisting through Google Support team.
9796
+ # calls. Example #1 (multi-turn /search API calls): Call /search API with the
9797
+ # session ID generated in the first call. Here, the previous search query gets
9798
+ # considered in query standing. I.e., if the first query is "How did Alphabet do
9799
+ # in 2022?" and the current query is "How about 2023?", the current query will
9800
+ # be interpreted as "How did Alphabet do in 2023?". Example #2 (coordination
9801
+ # between /search API calls and /answer API calls): Call /answer API with the
9802
+ # session ID generated in the first call. Here, the answer generation happens in
9803
+ # the context of the search results from the first search call. Multi-turn
9804
+ # Search feature is currently at private GA stage. Please use v1alpha or v1beta
9805
+ # version instead before we launch this feature to public GA. Or ask for
9806
+ # allowlisting through Google Support team.
8998
9807
  # Corresponds to the JSON property `session`
8999
9808
  # @return [String]
9000
9809
  attr_accessor :session
@@ -10934,6 +11743,266 @@ module Google
10934
11743
  end
10935
11744
  end
10936
11745
 
11746
+ # Request for the AssistantService.StreamAssist method.
11747
+ class GoogleCloudDiscoveryengineV1StreamAssistRequest
11748
+ include Google::Apis::Core::Hashable
11749
+
11750
+ # Assistant generation specification for the request. This allows to override
11751
+ # the default generation configuration at the engine level.
11752
+ # Corresponds to the JSON property `generationSpec`
11753
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1StreamAssistRequestGenerationSpec]
11754
+ attr_accessor :generation_spec
11755
+
11756
+ # Defines a user inputed query.
11757
+ # Corresponds to the JSON property `query`
11758
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Query]
11759
+ attr_accessor :query
11760
+
11761
+ # Optional. The session to use for the request. If specified, the assistant has
11762
+ # access to the session history, and the query and the answer are stored there.
11763
+ # If `-` is specified as the session ID, or it is left empty, then a new session
11764
+ # is created with an automatically generated ID. Format: `projects/`project`/
11765
+ # locations/`location`/collections/`collection`/engines/`engine`/sessions/`
11766
+ # session``
11767
+ # Corresponds to the JSON property `session`
11768
+ # @return [String]
11769
+ attr_accessor :session
11770
+
11771
+ # Specification of tools that are used to serve the request.
11772
+ # Corresponds to the JSON property `toolsSpec`
11773
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpec]
11774
+ attr_accessor :tools_spec
11775
+
11776
+ # User metadata of the request.
11777
+ # Corresponds to the JSON property `userMetadata`
11778
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistUserMetadata]
11779
+ attr_accessor :user_metadata
11780
+
11781
+ def initialize(**args)
11782
+ update!(**args)
11783
+ end
11784
+
11785
+ # Update properties of this object
11786
+ def update!(**args)
11787
+ @generation_spec = args[:generation_spec] if args.key?(:generation_spec)
11788
+ @query = args[:query] if args.key?(:query)
11789
+ @session = args[:session] if args.key?(:session)
11790
+ @tools_spec = args[:tools_spec] if args.key?(:tools_spec)
11791
+ @user_metadata = args[:user_metadata] if args.key?(:user_metadata)
11792
+ end
11793
+ end
11794
+
11795
+ # Assistant generation specification for the request. This allows to override
11796
+ # the default generation configuration at the engine level.
11797
+ class GoogleCloudDiscoveryengineV1StreamAssistRequestGenerationSpec
11798
+ include Google::Apis::Core::Hashable
11799
+
11800
+ # Optional. The Vertex AI model_id used for the generative model. If not set,
11801
+ # the default Assistant model will be used.
11802
+ # Corresponds to the JSON property `modelId`
11803
+ # @return [String]
11804
+ attr_accessor :model_id
11805
+
11806
+ def initialize(**args)
11807
+ update!(**args)
11808
+ end
11809
+
11810
+ # Update properties of this object
11811
+ def update!(**args)
11812
+ @model_id = args[:model_id] if args.key?(:model_id)
11813
+ end
11814
+ end
11815
+
11816
+ # Specification of tools that are used to serve the request.
11817
+ class GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpec
11818
+ include Google::Apis::Core::Hashable
11819
+
11820
+ # Specification of the image generation tool.
11821
+ # Corresponds to the JSON property `imageGenerationSpec`
11822
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecImageGenerationSpec]
11823
+ attr_accessor :image_generation_spec
11824
+
11825
+ # Optional. The name of the tool registry to use. Format: `projects/`project`/
11826
+ # locations/`location`/toolRegistries/`tool_registry``
11827
+ # Corresponds to the JSON property `toolRegistry`
11828
+ # @return [String]
11829
+ attr_accessor :tool_registry
11830
+
11831
+ # Specification of the Vertex AI Search tool.
11832
+ # Corresponds to the JSON property `vertexAiSearchSpec`
11833
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecVertexAiSearchSpec]
11834
+ attr_accessor :vertex_ai_search_spec
11835
+
11836
+ # Specification of the video generation tool.
11837
+ # Corresponds to the JSON property `videoGenerationSpec`
11838
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecVideoGenerationSpec]
11839
+ attr_accessor :video_generation_spec
11840
+
11841
+ # Specification of the web grounding tool.
11842
+ # Corresponds to the JSON property `webGroundingSpec`
11843
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecWebGroundingSpec]
11844
+ attr_accessor :web_grounding_spec
11845
+
11846
+ def initialize(**args)
11847
+ update!(**args)
11848
+ end
11849
+
11850
+ # Update properties of this object
11851
+ def update!(**args)
11852
+ @image_generation_spec = args[:image_generation_spec] if args.key?(:image_generation_spec)
11853
+ @tool_registry = args[:tool_registry] if args.key?(:tool_registry)
11854
+ @vertex_ai_search_spec = args[:vertex_ai_search_spec] if args.key?(:vertex_ai_search_spec)
11855
+ @video_generation_spec = args[:video_generation_spec] if args.key?(:video_generation_spec)
11856
+ @web_grounding_spec = args[:web_grounding_spec] if args.key?(:web_grounding_spec)
11857
+ end
11858
+ end
11859
+
11860
+ # Specification of the image generation tool.
11861
+ class GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecImageGenerationSpec
11862
+ include Google::Apis::Core::Hashable
11863
+
11864
+ def initialize(**args)
11865
+ update!(**args)
11866
+ end
11867
+
11868
+ # Update properties of this object
11869
+ def update!(**args)
11870
+ end
11871
+ end
11872
+
11873
+ # Specification of the Vertex AI Search tool.
11874
+ class GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecVertexAiSearchSpec
11875
+ include Google::Apis::Core::Hashable
11876
+
11877
+ # Optional. Specs defining DataStores to filter on in a search call and
11878
+ # configurations for those data stores. This is only considered for Engines with
11879
+ # multiple data stores.
11880
+ # Corresponds to the JSON property `dataStoreSpecs`
11881
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec>]
11882
+ attr_accessor :data_store_specs
11883
+
11884
+ # Optional. Deprecated. Please refrain from using this field. Whether the Vertex
11885
+ # AI Search tool is disabled. Default value is false, the tool is enabled by
11886
+ # default.
11887
+ # Corresponds to the JSON property `disabled`
11888
+ # @return [Boolean]
11889
+ attr_accessor :disabled
11890
+ alias_method :disabled?, :disabled
11891
+
11892
+ # Optional. The filter syntax consists of an expression language for
11893
+ # constructing a predicate from one or more fields of the documents being
11894
+ # filtered. Filter expression is case-sensitive. If this field is unrecognizable,
11895
+ # an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by
11896
+ # mapping the LHS filter key to a key property defined in the Vertex AI Search
11897
+ # backend -- this mapping is defined by the customer in their schema. For
11898
+ # example a media customer might have a field 'name' in their schema. In this
11899
+ # case the filter would look like this: filter --> name:'ANY("king kong")' For
11900
+ # more information about filtering including syntax and filter operators, see [
11901
+ # Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-
11902
+ # metadata)
11903
+ # Corresponds to the JSON property `filter`
11904
+ # @return [String]
11905
+ attr_accessor :filter
11906
+
11907
+ def initialize(**args)
11908
+ update!(**args)
11909
+ end
11910
+
11911
+ # Update properties of this object
11912
+ def update!(**args)
11913
+ @data_store_specs = args[:data_store_specs] if args.key?(:data_store_specs)
11914
+ @disabled = args[:disabled] if args.key?(:disabled)
11915
+ @filter = args[:filter] if args.key?(:filter)
11916
+ end
11917
+ end
11918
+
11919
+ # Specification of the video generation tool.
11920
+ class GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecVideoGenerationSpec
11921
+ include Google::Apis::Core::Hashable
11922
+
11923
+ def initialize(**args)
11924
+ update!(**args)
11925
+ end
11926
+
11927
+ # Update properties of this object
11928
+ def update!(**args)
11929
+ end
11930
+ end
11931
+
11932
+ # Specification of the web grounding tool.
11933
+ class GoogleCloudDiscoveryengineV1StreamAssistRequestToolsSpecWebGroundingSpec
11934
+ include Google::Apis::Core::Hashable
11935
+
11936
+ # Optional. Deprecated. Please refrain from using this field. Whether the web
11937
+ # grounding tool is enabled.
11938
+ # Corresponds to the JSON property `enabled`
11939
+ # @return [Boolean]
11940
+ attr_accessor :enabled
11941
+ alias_method :enabled?, :enabled
11942
+
11943
+ def initialize(**args)
11944
+ update!(**args)
11945
+ end
11946
+
11947
+ # Update properties of this object
11948
+ def update!(**args)
11949
+ @enabled = args[:enabled] if args.key?(:enabled)
11950
+ end
11951
+ end
11952
+
11953
+ # Response for the AssistantService.StreamAssist method.
11954
+ class GoogleCloudDiscoveryengineV1StreamAssistResponse
11955
+ include Google::Apis::Core::Hashable
11956
+
11957
+ # AssistAnswer resource, main part of AssistResponse.
11958
+ # Corresponds to the JSON property `answer`
11959
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AssistAnswer]
11960
+ attr_accessor :answer
11961
+
11962
+ # A global unique ID that identifies the current pair of request and stream of
11963
+ # responses. Used for feedback and support.
11964
+ # Corresponds to the JSON property `assistToken`
11965
+ # @return [String]
11966
+ attr_accessor :assist_token
11967
+
11968
+ # Information about the session.
11969
+ # Corresponds to the JSON property `sessionInfo`
11970
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1StreamAssistResponseSessionInfo]
11971
+ attr_accessor :session_info
11972
+
11973
+ def initialize(**args)
11974
+ update!(**args)
11975
+ end
11976
+
11977
+ # Update properties of this object
11978
+ def update!(**args)
11979
+ @answer = args[:answer] if args.key?(:answer)
11980
+ @assist_token = args[:assist_token] if args.key?(:assist_token)
11981
+ @session_info = args[:session_info] if args.key?(:session_info)
11982
+ end
11983
+ end
11984
+
11985
+ # Information about the session.
11986
+ class GoogleCloudDiscoveryengineV1StreamAssistResponseSessionInfo
11987
+ include Google::Apis::Core::Hashable
11988
+
11989
+ # Name of the newly generated or continued session. Format: `projects/`project`/
11990
+ # locations/`location`/collections/`collection`/engines/`engine`/sessions/`
11991
+ # session``.
11992
+ # Corresponds to the JSON property `session`
11993
+ # @return [String]
11994
+ attr_accessor :session
11995
+
11996
+ def initialize(**args)
11997
+ update!(**args)
11998
+ end
11999
+
12000
+ # Update properties of this object
12001
+ def update!(**args)
12002
+ @session = args[:session] if args.key?(:session)
12003
+ end
12004
+ end
12005
+
10937
12006
  # Suggestion deny list entry identifying the phrase to block from suggestions
10938
12007
  # and the applied operation for the phrase.
10939
12008
  class GoogleCloudDiscoveryengineV1SuggestionDenyListEntry
@@ -14091,6 +15160,11 @@ module Google
14091
15160
  # @return [String]
14092
15161
  attr_accessor :realtime_sync_secret
14093
15162
 
15163
+ # Streaming error details.
15164
+ # Corresponds to the JSON property `streamingError`
15165
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1alphaDataConnectorRealtimeSyncConfigStreamingError]
15166
+ attr_accessor :streaming_error
15167
+
14094
15168
  # Optional. Webhook url for the connector to specify additional params for
14095
15169
  # realtime sync.
14096
15170
  # Corresponds to the JSON property `webhookUri`
@@ -14104,10 +15178,41 @@ module Google
14104
15178
  # Update properties of this object
14105
15179
  def update!(**args)
14106
15180
  @realtime_sync_secret = args[:realtime_sync_secret] if args.key?(:realtime_sync_secret)
15181
+ @streaming_error = args[:streaming_error] if args.key?(:streaming_error)
14107
15182
  @webhook_uri = args[:webhook_uri] if args.key?(:webhook_uri)
14108
15183
  end
14109
15184
  end
14110
15185
 
15186
+ # Streaming error details.
15187
+ class GoogleCloudDiscoveryengineV1alphaDataConnectorRealtimeSyncConfigStreamingError
15188
+ include Google::Apis::Core::Hashable
15189
+
15190
+ # The `Status` type defines a logical error model that is suitable for different
15191
+ # programming environments, including REST APIs and RPC APIs. It is used by [
15192
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
15193
+ # data: error code, error message, and error details. You can find out more
15194
+ # about this error model and how to work with it in the [API Design Guide](https:
15195
+ # //cloud.google.com/apis/design/errors).
15196
+ # Corresponds to the JSON property `error`
15197
+ # @return [Google::Apis::DiscoveryengineV1::GoogleRpcStatus]
15198
+ attr_accessor :error
15199
+
15200
+ # Optional. Streaming error.
15201
+ # Corresponds to the JSON property `streamingErrorReason`
15202
+ # @return [String]
15203
+ attr_accessor :streaming_error_reason
15204
+
15205
+ def initialize(**args)
15206
+ update!(**args)
15207
+ end
15208
+
15209
+ # Update properties of this object
15210
+ def update!(**args)
15211
+ @error = args[:error] if args.key?(:error)
15212
+ @streaming_error_reason = args[:streaming_error_reason] if args.key?(:streaming_error_reason)
15213
+ end
15214
+ end
15215
+
14111
15216
  # Represents an entity in the data source. For example, the `Account` object in
14112
15217
  # Salesforce.
14113
15218
  class GoogleCloudDiscoveryengineV1alphaDataConnectorSourceEntity
@@ -14931,6 +16036,13 @@ module Google
14931
16036
  class GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig
14932
16037
  include Google::Apis::Core::Hashable
14933
16038
 
16039
+ # Optional. If true, the processed document will be made available for the
16040
+ # GetProcessedDocument API.
16041
+ # Corresponds to the JSON property `enableGetProcessedDocument`
16042
+ # @return [Boolean]
16043
+ attr_accessor :enable_get_processed_document
16044
+ alias_method :enable_get_processed_document?, :enable_get_processed_document
16045
+
14934
16046
  # Optional. If true, the LLM based annotation is added to the image during
14935
16047
  # parsing.
14936
16048
  # Corresponds to the JSON property `enableImageAnnotation`
@@ -14972,6 +16084,7 @@ module Google
14972
16084
 
14973
16085
  # Update properties of this object
14974
16086
  def update!(**args)
16087
+ @enable_get_processed_document = args[:enable_get_processed_document] if args.key?(:enable_get_processed_document)
14975
16088
  @enable_image_annotation = args[:enable_image_annotation] if args.key?(:enable_image_annotation)
14976
16089
  @enable_table_annotation = args[:enable_table_annotation] if args.key?(:enable_table_annotation)
14977
16090
  @exclude_html_classes = args[:exclude_html_classes] if args.key?(:exclude_html_classes)
@@ -15101,7 +16214,8 @@ module Google
15101
16214
  # Supported keys: * `*`: all features, if it's present, all other feature state
15102
16215
  # settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-
15103
16216
  # gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-
15104
- # org-chart` * `bi-directional-audio` * `feedback` * `session-sharing`
16217
+ # org-chart` * `bi-directional-audio` * `feedback` * `session-sharing` * `
16218
+ # personalization-memory` - Enables personalization based on user preferences.
15105
16219
  # Corresponds to the JSON property `features`
15106
16220
  # @return [Hash<String,String>]
15107
16221
  attr_accessor :features
@@ -16535,7 +17649,8 @@ module Google
16535
17649
  include Google::Apis::Core::Hashable
16536
17650
 
16537
17651
  # A filter to apply on the list results. The supported features are:
16538
- # user_pseudo_id, state. Example: "user_pseudo_id = some_id"
17652
+ # user_pseudo_id, state, starred. Examples: "user_pseudo_id = some_id" "starred =
17653
+ # true"
16539
17654
  # Corresponds to the JSON property `filter`
16540
17655
  # @return [String]
16541
17656
  attr_accessor :filter
@@ -17736,10 +18851,11 @@ module Google
17736
18851
  # relevance and attractiveness of a search result from a user's perspective. A
17737
18852
  # higher pCTR suggests that the result is more likely to satisfy the user's
17738
18853
  # query and intent, making it a valuable signal for ranking. * `freshness_rank`:
17739
- # freshness adjustment as a rank * `topicality_rank`: topicality adjustment as a
17740
- # rank. Uses proprietary Google model to determine the keyword-based overlap
17741
- # between the query and the document. * `base_rank`: the default rank of the
17742
- # result
18854
+ # freshness adjustment as a rank * `document_age`: The time in hours elapsed
18855
+ # since the document was last updated, a floating-point number (e.g., 0.25 means
18856
+ # 15 minutes). * `topicality_rank`: topicality adjustment as a rank. Uses
18857
+ # proprietary Google model to determine the keyword-based overlap between the
18858
+ # query and the document. * `base_rank`: the default rank of the result
17743
18859
  # Corresponds to the JSON property `rankingExpression`
17744
18860
  # @return [String]
17745
18861
  attr_accessor :ranking_expression
@@ -17793,21 +18909,17 @@ module Google
17793
18909
 
17794
18910
  # The session resource name. Optional. Session allows users to do multi-turn /
17795
18911
  # search API calls or coordination between /search API calls and /answer API
17796
- # calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the
17797
- # auto-session mode (see below). 2. Call /search API with the session ID
17798
- # generated in the first call. Here, the previous search query gets considered
17799
- # in query standing. I.e., if the first query is "How did Alphabet do in 2022?"
17800
- # and the current query is "How about 2023?", the current query will be
17801
- # interpreted as "How did Alphabet do in 2023?". Example #2 (coordination
17802
- # between /search API calls and /answer API calls): 1. Call /search API with the
17803
- # auto-session mode (see below). 2. Call /answer API with the session ID
17804
- # generated in the first call. Here, the answer generation happens in the
17805
- # context of the search results from the first search call. Auto-session mode:
17806
- # when `projects/.../sessions/-` is used, a new session gets automatically
17807
- # created. Otherwise, users can use the create-session API to create a session
17808
- # manually. Multi-turn Search feature is currently at private GA stage. Please
17809
- # use v1alpha or v1beta version instead before we launch this feature to public
17810
- # GA. Or ask for allowlisting through Google Support team.
18912
+ # calls. Example #1 (multi-turn /search API calls): Call /search API with the
18913
+ # session ID generated in the first call. Here, the previous search query gets
18914
+ # considered in query standing. I.e., if the first query is "How did Alphabet do
18915
+ # in 2022?" and the current query is "How about 2023?", the current query will
18916
+ # be interpreted as "How did Alphabet do in 2023?". Example #2 (coordination
18917
+ # between /search API calls and /answer API calls): Call /answer API with the
18918
+ # session ID generated in the first call. Here, the answer generation happens in
18919
+ # the context of the search results from the first search call. Multi-turn
18920
+ # Search feature is currently at private GA stage. Please use v1alpha or v1beta
18921
+ # version instead before we launch this feature to public GA. Or ask for
18922
+ # allowlisting through Google Support team.
17811
18923
  # Corresponds to the JSON property `session`
17812
18924
  # @return [String]
17813
18925
  attr_accessor :session
@@ -21145,6 +22257,13 @@ module Google
21145
22257
  class GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig
21146
22258
  include Google::Apis::Core::Hashable
21147
22259
 
22260
+ # Optional. If true, the processed document will be made available for the
22261
+ # GetProcessedDocument API.
22262
+ # Corresponds to the JSON property `enableGetProcessedDocument`
22263
+ # @return [Boolean]
22264
+ attr_accessor :enable_get_processed_document
22265
+ alias_method :enable_get_processed_document?, :enable_get_processed_document
22266
+
21148
22267
  # Optional. If true, the LLM based annotation is added to the image during
21149
22268
  # parsing.
21150
22269
  # Corresponds to the JSON property `enableImageAnnotation`
@@ -21186,6 +22305,7 @@ module Google
21186
22305
 
21187
22306
  # Update properties of this object
21188
22307
  def update!(**args)
22308
+ @enable_get_processed_document = args[:enable_get_processed_document] if args.key?(:enable_get_processed_document)
21189
22309
  @enable_image_annotation = args[:enable_image_annotation] if args.key?(:enable_image_annotation)
21190
22310
  @enable_table_annotation = args[:enable_table_annotation] if args.key?(:enable_table_annotation)
21191
22311
  @exclude_html_classes = args[:exclude_html_classes] if args.key?(:exclude_html_classes)
@@ -21315,7 +22435,8 @@ module Google
21315
22435
  # Supported keys: * `*`: all features, if it's present, all other feature state
21316
22436
  # settings are ignored. * `agent-gallery` * `no-code-agent-builder` * `prompt-
21317
22437
  # gallery` * `model-selector` * `notebook-lm` * `people-search` * `people-search-
21318
- # org-chart` * `bi-directional-audio` * `feedback` * `session-sharing`
22438
+ # org-chart` * `bi-directional-audio` * `feedback` * `session-sharing` * `
22439
+ # personalization-memory` - Enables personalization based on user preferences.
21319
22440
  # Corresponds to the JSON property `features`
21320
22441
  # @return [Hash<String,String>]
21321
22442
  attr_accessor :features
@@ -23098,10 +24219,11 @@ module Google
23098
24219
  # relevance and attractiveness of a search result from a user's perspective. A
23099
24220
  # higher pCTR suggests that the result is more likely to satisfy the user's
23100
24221
  # query and intent, making it a valuable signal for ranking. * `freshness_rank`:
23101
- # freshness adjustment as a rank * `topicality_rank`: topicality adjustment as a
23102
- # rank. Uses proprietary Google model to determine the keyword-based overlap
23103
- # between the query and the document. * `base_rank`: the default rank of the
23104
- # result
24222
+ # freshness adjustment as a rank * `document_age`: The time in hours elapsed
24223
+ # since the document was last updated, a floating-point number (e.g., 0.25 means
24224
+ # 15 minutes). * `topicality_rank`: topicality adjustment as a rank. Uses
24225
+ # proprietary Google model to determine the keyword-based overlap between the
24226
+ # query and the document. * `base_rank`: the default rank of the result
23105
24227
  # Corresponds to the JSON property `rankingExpression`
23106
24228
  # @return [String]
23107
24229
  attr_accessor :ranking_expression
@@ -23155,21 +24277,17 @@ module Google
23155
24277
 
23156
24278
  # The session resource name. Optional. Session allows users to do multi-turn /
23157
24279
  # search API calls or coordination between /search API calls and /answer API
23158
- # calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the
23159
- # auto-session mode (see below). 2. Call /search API with the session ID
23160
- # generated in the first call. Here, the previous search query gets considered
23161
- # in query standing. I.e., if the first query is "How did Alphabet do in 2022?"
23162
- # and the current query is "How about 2023?", the current query will be
23163
- # interpreted as "How did Alphabet do in 2023?". Example #2 (coordination
23164
- # between /search API calls and /answer API calls): 1. Call /search API with the
23165
- # auto-session mode (see below). 2. Call /answer API with the session ID
23166
- # generated in the first call. Here, the answer generation happens in the
23167
- # context of the search results from the first search call. Auto-session mode:
23168
- # when `projects/.../sessions/-` is used, a new session gets automatically
23169
- # created. Otherwise, users can use the create-session API to create a session
23170
- # manually. Multi-turn Search feature is currently at private GA stage. Please
23171
- # use v1alpha or v1beta version instead before we launch this feature to public
23172
- # GA. Or ask for allowlisting through Google Support team.
24280
+ # calls. Example #1 (multi-turn /search API calls): Call /search API with the
24281
+ # session ID generated in the first call. Here, the previous search query gets
24282
+ # considered in query standing. I.e., if the first query is "How did Alphabet do
24283
+ # in 2022?" and the current query is "How about 2023?", the current query will
24284
+ # be interpreted as "How did Alphabet do in 2023?". Example #2 (coordination
24285
+ # between /search API calls and /answer API calls): Call /answer API with the
24286
+ # session ID generated in the first call. Here, the answer generation happens in
24287
+ # the context of the search results from the first search call. Multi-turn
24288
+ # Search feature is currently at private GA stage. Please use v1alpha or v1beta
24289
+ # version instead before we launch this feature to public GA. Or ask for
24290
+ # allowlisting through Google Support team.
23173
24291
  # Corresponds to the JSON property `session`
23174
24292
  # @return [String]
23175
24293
  attr_accessor :session