google-apis-discoveryengine_v1 0.23.0 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -792,6 +792,17 @@ module Google
792
792
  # @return [String]
793
793
  attr_accessor :create_time
794
794
 
795
+ # A score in the range of [0, 1] describing how grounded the answer is by the
796
+ # reference chunks.
797
+ # Corresponds to the JSON property `groundingScore`
798
+ # @return [Float]
799
+ attr_accessor :grounding_score
800
+
801
+ # Optional. Grounding supports.
802
+ # Corresponds to the JSON property `groundingSupports`
803
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerGroundingSupport>]
804
+ attr_accessor :grounding_supports
805
+
795
806
  # Immutable. Fully qualified name `projects/`project`/locations/global/
796
807
  # collections/`collection`/engines/`engine`/sessions/*/answers/*`
797
808
  # Corresponds to the JSON property `name`
@@ -834,6 +845,8 @@ module Google
834
845
  @citations = args[:citations] if args.key?(:citations)
835
846
  @complete_time = args[:complete_time] if args.key?(:complete_time)
836
847
  @create_time = args[:create_time] if args.key?(:create_time)
848
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
849
+ @grounding_supports = args[:grounding_supports] if args.key?(:grounding_supports)
837
850
  @name = args[:name] if args.key?(:name)
838
851
  @query_understanding_info = args[:query_understanding_info] if args.key?(:query_understanding_info)
839
852
  @references = args[:references] if args.key?(:references)
@@ -893,6 +906,56 @@ module Google
893
906
  end
894
907
  end
895
908
 
909
+ # Grounding support for a claim in `answer_text`.
910
+ class GoogleCloudDiscoveryengineV1AnswerGroundingSupport
911
+ include Google::Apis::Core::Hashable
912
+
913
+ # Required. End of the claim, exclusive.
914
+ # Corresponds to the JSON property `endIndex`
915
+ # @return [Fixnum]
916
+ attr_accessor :end_index
917
+
918
+ # Indicates that this claim required grounding check. When the system decided
919
+ # this claim didn't require attribution/grounding check, this field is set to
920
+ # false. In that case, no grounding check was done for the claim and therefore `
921
+ # grounding_score`, `sources` is not returned.
922
+ # Corresponds to the JSON property `groundingCheckRequired`
923
+ # @return [Boolean]
924
+ attr_accessor :grounding_check_required
925
+ alias_method :grounding_check_required?, :grounding_check_required
926
+
927
+ # A score in the range of [0, 1] describing how grounded is a specific claim by
928
+ # the references. Higher value means that the claim is better supported by the
929
+ # reference chunks.
930
+ # Corresponds to the JSON property `groundingScore`
931
+ # @return [Float]
932
+ attr_accessor :grounding_score
933
+
934
+ # Optional. Citation sources for the claim.
935
+ # Corresponds to the JSON property `sources`
936
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerCitationSource>]
937
+ attr_accessor :sources
938
+
939
+ # Required. Index indicates the start of the claim, measured in bytes (UTF-8
940
+ # unicode).
941
+ # Corresponds to the JSON property `startIndex`
942
+ # @return [Fixnum]
943
+ attr_accessor :start_index
944
+
945
+ def initialize(**args)
946
+ update!(**args)
947
+ end
948
+
949
+ # Update properties of this object
950
+ def update!(**args)
951
+ @end_index = args[:end_index] if args.key?(:end_index)
952
+ @grounding_check_required = args[:grounding_check_required] if args.key?(:grounding_check_required)
953
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
954
+ @sources = args[:sources] if args.key?(:sources)
955
+ @start_index = args[:start_index] if args.key?(:start_index)
956
+ end
957
+ end
958
+
896
959
  # Request message for ConversationalSearchService.AnswerQuery method.
897
960
  class GoogleCloudDiscoveryengineV1AnswerQueryRequest
898
961
  include Google::Apis::Core::Hashable
@@ -933,7 +996,10 @@ module Google
933
996
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec]
934
997
  attr_accessor :related_questions_spec
935
998
 
936
- # Safety specification.
999
+ # Safety specification. There are two use cases: 1. when only safety_spec.enable
1000
+ # is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories.
1001
+ # 2. when safety_spec.enable is set and some safety_settings are set, only
1002
+ # specified safety_settings are applied.
937
1003
  # Corresponds to the JSON property `safetySpec`
938
1004
  # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec]
939
1005
  attr_accessor :safety_spec
@@ -1214,6 +1280,11 @@ module Google
1214
1280
  # @return [Fixnum]
1215
1281
  attr_accessor :max_rephrase_steps
1216
1282
 
1283
+ # Query Rephraser Model specification.
1284
+ # Corresponds to the JSON property `modelSpec`
1285
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec]
1286
+ attr_accessor :model_spec
1287
+
1217
1288
  def initialize(**args)
1218
1289
  update!(**args)
1219
1290
  end
@@ -1222,6 +1293,27 @@ module Google
1222
1293
  def update!(**args)
1223
1294
  @disable = args[:disable] if args.key?(:disable)
1224
1295
  @max_rephrase_steps = args[:max_rephrase_steps] if args.key?(:max_rephrase_steps)
1296
+ @model_spec = args[:model_spec] if args.key?(:model_spec)
1297
+ end
1298
+ end
1299
+
1300
+ # Query Rephraser Model specification.
1301
+ class GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec
1302
+ include Google::Apis::Core::Hashable
1303
+
1304
+ # Optional. Enabled query rephraser model type. If not set, it will use LARGE by
1305
+ # default.
1306
+ # Corresponds to the JSON property `modelType`
1307
+ # @return [String]
1308
+ attr_accessor :model_type
1309
+
1310
+ def initialize(**args)
1311
+ update!(**args)
1312
+ end
1313
+
1314
+ # Update properties of this object
1315
+ def update!(**args)
1316
+ @model_type = args[:model_type] if args.key?(:model_type)
1225
1317
  end
1226
1318
  end
1227
1319
 
@@ -1245,7 +1337,10 @@ module Google
1245
1337
  end
1246
1338
  end
1247
1339
 
1248
- # Safety specification.
1340
+ # Safety specification. There are two use cases: 1. when only safety_spec.enable
1341
+ # is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories.
1342
+ # 2. when safety_spec.enable is set and some safety_settings are set, only
1343
+ # specified safety_settings are applied.
1249
1344
  class GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec
1250
1345
  include Google::Apis::Core::Hashable
1251
1346
 
@@ -5017,6 +5112,17 @@ module Google
5017
5112
  # @return [Array<String>]
5018
5113
  attr_accessor :resource_types
5019
5114
 
5115
+ # Optional. Whether to update the DataStore schema to the latest predefined
5116
+ # schema. If true, the DataStore schema will be updated to include any FHIR
5117
+ # fields or resource types that have been added since the last import and
5118
+ # corresponding FHIR resources will be imported from the FHIR store. Note this
5119
+ # field cannot be used in conjunction with `resource_types`. It should be used
5120
+ # after initial import.
5121
+ # Corresponds to the JSON property `updateFromLatestPredefinedSchema`
5122
+ # @return [Boolean]
5123
+ attr_accessor :update_from_latest_predefined_schema
5124
+ alias_method :update_from_latest_predefined_schema?, :update_from_latest_predefined_schema
5125
+
5020
5126
  def initialize(**args)
5021
5127
  update!(**args)
5022
5128
  end
@@ -5026,6 +5132,7 @@ module Google
5026
5132
  @fhir_store = args[:fhir_store] if args.key?(:fhir_store)
5027
5133
  @gcs_staging_dir = args[:gcs_staging_dir] if args.key?(:gcs_staging_dir)
5028
5134
  @resource_types = args[:resource_types] if args.key?(:resource_types)
5135
+ @update_from_latest_predefined_schema = args[:update_from_latest_predefined_schema] if args.key?(:update_from_latest_predefined_schema)
5029
5136
  end
5030
5137
  end
5031
5138
 
@@ -7840,6 +7947,11 @@ module Google
7840
7947
  class GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec
7841
7948
  include Google::Apis::Core::Hashable
7842
7949
 
7950
+ # Boost specification to boost certain documents.
7951
+ # Corresponds to the JSON property `boostSpec`
7952
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestBoostSpec]
7953
+ attr_accessor :boost_spec
7954
+
7843
7955
  # Required. Full resource name of DataStore, such as `projects/`project`/
7844
7956
  # locations/`location`/collections/`collection_id`/dataStores/`data_store_id``.
7845
7957
  # Corresponds to the JSON property `dataStore`
@@ -7859,6 +7971,7 @@ module Google
7859
7971
 
7860
7972
  # Update properties of this object
7861
7973
  def update!(**args)
7974
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
7862
7975
  @data_store = args[:data_store] if args.key?(:data_store)
7863
7976
  @filter = args[:filter] if args.key?(:filter)
7864
7977
  end
@@ -8616,15 +8729,293 @@ module Google
8616
8729
  end
8617
8730
  end
8618
8731
 
8732
+ # Configures metadata that is used to generate serving time results (e.g. search
8733
+ # results or recommendation predictions). The ServingConfig is passed in the
8734
+ # search and predict request and generates results.
8735
+ class GoogleCloudDiscoveryengineV1ServingConfig
8736
+ include Google::Apis::Core::Hashable
8737
+
8738
+ # Boost controls to use in serving path. All triggered boost controls will be
8739
+ # applied. Boost controls must be in the same data store as the serving config.
8740
+ # Maximum of 20 boost controls.
8741
+ # Corresponds to the JSON property `boostControlIds`
8742
+ # @return [Array<String>]
8743
+ attr_accessor :boost_control_ids
8744
+
8745
+ # Output only. ServingConfig created timestamp.
8746
+ # Corresponds to the JSON property `createTime`
8747
+ # @return [String]
8748
+ attr_accessor :create_time
8749
+
8750
+ # Required. The human readable serving config display name. Used in Discovery UI.
8751
+ # This field must be a UTF-8 encoded string with a length limit of 128
8752
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
8753
+ # Corresponds to the JSON property `displayName`
8754
+ # @return [String]
8755
+ attr_accessor :display_name
8756
+
8757
+ # Condition do not associate specifications. If multiple do not associate
8758
+ # conditions match, all matching do not associate controls in the list will
8759
+ # execute. Order does not matter. Maximum number of specifications is 100. Can
8760
+ # only be set if SolutionType is SOLUTION_TYPE_SEARCH.
8761
+ # Corresponds to the JSON property `dissociateControlIds`
8762
+ # @return [Array<String>]
8763
+ attr_accessor :dissociate_control_ids
8764
+
8765
+ # How much diversity to use in recommendation model results e.g. `medium-
8766
+ # diversity` or `high-diversity`. Currently supported values: * `no-diversity` *
8767
+ # `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If
8768
+ # not specified, we choose default based on recommendation model type. Default
8769
+ # value: `no-diversity`. Can only be set if SolutionType is
8770
+ # SOLUTION_TYPE_RECOMMENDATION.
8771
+ # Corresponds to the JSON property `diversityLevel`
8772
+ # @return [String]
8773
+ attr_accessor :diversity_level
8774
+
8775
+ # Filter controls to use in serving path. All triggered filter controls will be
8776
+ # applied. Filter controls must be in the same data store as the serving config.
8777
+ # Maximum of 20 filter controls.
8778
+ # Corresponds to the JSON property `filterControlIds`
8779
+ # @return [Array<String>]
8780
+ attr_accessor :filter_control_ids
8781
+
8782
+ # Specifies the configurations needed for Generic Discovery.Currently we support:
8783
+ # * `content_search_spec`: configuration for generic content search.
8784
+ # Corresponds to the JSON property `genericConfig`
8785
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1ServingConfigGenericConfig]
8786
+ attr_accessor :generic_config
8787
+
8788
+ # Condition ignore specifications. If multiple ignore conditions match, all
8789
+ # matching ignore controls in the list will execute. Order does not matter.
8790
+ # Maximum number of specifications is 100.
8791
+ # Corresponds to the JSON property `ignoreControlIds`
8792
+ # @return [Array<String>]
8793
+ attr_accessor :ignore_control_ids
8794
+
8795
+ # Specifies the configurations needed for Media Discovery. Currently we support:
8796
+ # * `demote_content_watched`: Threshold for watched content demotion. Customers
8797
+ # can specify if using watched content demotion or use viewed detail page. Using
8798
+ # the content watched demotion, customers need to specify the watched minutes or
8799
+ # percentage exceeds the threshold, the content will be demoted in the
8800
+ # recommendation result. * `promote_fresh_content`: cutoff days for fresh
8801
+ # content promotion. Customers can specify if using content freshness promotion.
8802
+ # If the content was published within the cutoff days, the content will be
8803
+ # promoted in the recommendation result. Can only be set if SolutionType is
8804
+ # SOLUTION_TYPE_RECOMMENDATION.
8805
+ # Corresponds to the JSON property `mediaConfig`
8806
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1ServingConfigMediaConfig]
8807
+ attr_accessor :media_config
8808
+
8809
+ # The id of the model to use at serving time. Currently only
8810
+ # RecommendationModels are supported. Can be changed but only to a compatible
8811
+ # model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
8812
+ # SolutionType is SOLUTION_TYPE_RECOMMENDATION.
8813
+ # Corresponds to the JSON property `modelId`
8814
+ # @return [String]
8815
+ attr_accessor :model_id
8816
+
8817
+ # Immutable. Fully qualified name `projects/`project`/locations/`location`/
8818
+ # collections/`collection_id`/engines/`engine_id`/servingConfigs/`
8819
+ # serving_config_id``
8820
+ # Corresponds to the JSON property `name`
8821
+ # @return [String]
8822
+ attr_accessor :name
8823
+
8824
+ # Condition oneway synonyms specifications. If multiple oneway synonyms
8825
+ # conditions match, all matching oneway synonyms controls in the list will
8826
+ # execute. Maximum number of specifications is 100. Can only be set if
8827
+ # SolutionType is SOLUTION_TYPE_SEARCH.
8828
+ # Corresponds to the JSON property `onewaySynonymsControlIds`
8829
+ # @return [Array<String>]
8830
+ attr_accessor :oneway_synonyms_control_ids
8831
+
8832
+ # Condition promote specifications. Maximum number of specifications is 100.
8833
+ # Corresponds to the JSON property `promoteControlIds`
8834
+ # @return [Array<String>]
8835
+ attr_accessor :promote_control_ids
8836
+
8837
+ # The ranking expression controls the customized ranking on retrieval documents.
8838
+ # To leverage this, document embedding is required. The ranking expression
8839
+ # setting in ServingConfig applies to all search requests served by the serving
8840
+ # config. However, if SearchRequest.ranking_expression is specified, it
8841
+ # overrides the ServingConfig ranking expression. The ranking expression is a
8842
+ # single function or multiple functions that are joined by "+". *
8843
+ # ranking_expression = function, ` " + ", function `; Supported functions: *
8844
+ # double * relevance_score * double * dotProduct(embedding_field_path) Function
8845
+ # variables: * `relevance_score`: pre-defined keywords, used for measure
8846
+ # relevance between query and document. * `embedding_field_path`: the document
8847
+ # embedding field used with query embedding vector. * `dotProduct`: embedding
8848
+ # function between embedding_field_path and query embedding vector. Example
8849
+ # ranking expression: If document has an embedding field doc_embedding, the
8850
+ # ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(
8851
+ # doc_embedding)`.
8852
+ # Corresponds to the JSON property `rankingExpression`
8853
+ # @return [String]
8854
+ attr_accessor :ranking_expression
8855
+
8856
+ # IDs of the redirect controls. Only the first triggered redirect action is
8857
+ # applied, even if multiple apply. Maximum number of specifications is 100. Can
8858
+ # only be set if SolutionType is SOLUTION_TYPE_SEARCH.
8859
+ # Corresponds to the JSON property `redirectControlIds`
8860
+ # @return [Array<String>]
8861
+ attr_accessor :redirect_control_ids
8862
+
8863
+ # Condition replacement specifications. Applied according to the order in the
8864
+ # list. A previously replaced term can not be re-replaced. Maximum number of
8865
+ # specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
8866
+ # Corresponds to the JSON property `replacementControlIds`
8867
+ # @return [Array<String>]
8868
+ attr_accessor :replacement_control_ids
8869
+
8870
+ # Required. Immutable. Specifies the solution type that a serving config can be
8871
+ # associated with.
8872
+ # Corresponds to the JSON property `solutionType`
8873
+ # @return [String]
8874
+ attr_accessor :solution_type
8875
+
8876
+ # Condition synonyms specifications. If multiple synonyms conditions match, all
8877
+ # matching synonyms controls in the list will execute. Maximum number of
8878
+ # specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.
8879
+ # Corresponds to the JSON property `synonymsControlIds`
8880
+ # @return [Array<String>]
8881
+ attr_accessor :synonyms_control_ids
8882
+
8883
+ # Output only. ServingConfig updated timestamp.
8884
+ # Corresponds to the JSON property `updateTime`
8885
+ # @return [String]
8886
+ attr_accessor :update_time
8887
+
8888
+ def initialize(**args)
8889
+ update!(**args)
8890
+ end
8891
+
8892
+ # Update properties of this object
8893
+ def update!(**args)
8894
+ @boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
8895
+ @create_time = args[:create_time] if args.key?(:create_time)
8896
+ @display_name = args[:display_name] if args.key?(:display_name)
8897
+ @dissociate_control_ids = args[:dissociate_control_ids] if args.key?(:dissociate_control_ids)
8898
+ @diversity_level = args[:diversity_level] if args.key?(:diversity_level)
8899
+ @filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids)
8900
+ @generic_config = args[:generic_config] if args.key?(:generic_config)
8901
+ @ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids)
8902
+ @media_config = args[:media_config] if args.key?(:media_config)
8903
+ @model_id = args[:model_id] if args.key?(:model_id)
8904
+ @name = args[:name] if args.key?(:name)
8905
+ @oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids)
8906
+ @promote_control_ids = args[:promote_control_ids] if args.key?(:promote_control_ids)
8907
+ @ranking_expression = args[:ranking_expression] if args.key?(:ranking_expression)
8908
+ @redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids)
8909
+ @replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids)
8910
+ @solution_type = args[:solution_type] if args.key?(:solution_type)
8911
+ @synonyms_control_ids = args[:synonyms_control_ids] if args.key?(:synonyms_control_ids)
8912
+ @update_time = args[:update_time] if args.key?(:update_time)
8913
+ end
8914
+ end
8915
+
8916
+ # Specifies the configurations needed for Generic Discovery.Currently we support:
8917
+ # * `content_search_spec`: configuration for generic content search.
8918
+ class GoogleCloudDiscoveryengineV1ServingConfigGenericConfig
8919
+ include Google::Apis::Core::Hashable
8920
+
8921
+ # A specification for configuring the behavior of content search.
8922
+ # Corresponds to the JSON property `contentSearchSpec`
8923
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec]
8924
+ attr_accessor :content_search_spec
8925
+
8926
+ def initialize(**args)
8927
+ update!(**args)
8928
+ end
8929
+
8930
+ # Update properties of this object
8931
+ def update!(**args)
8932
+ @content_search_spec = args[:content_search_spec] if args.key?(:content_search_spec)
8933
+ end
8934
+ end
8935
+
8936
+ # Specifies the configurations needed for Media Discovery. Currently we support:
8937
+ # * `demote_content_watched`: Threshold for watched content demotion. Customers
8938
+ # can specify if using watched content demotion or use viewed detail page. Using
8939
+ # the content watched demotion, customers need to specify the watched minutes or
8940
+ # percentage exceeds the threshold, the content will be demoted in the
8941
+ # recommendation result. * `promote_fresh_content`: cutoff days for fresh
8942
+ # content promotion. Customers can specify if using content freshness promotion.
8943
+ # If the content was published within the cutoff days, the content will be
8944
+ # promoted in the recommendation result. Can only be set if SolutionType is
8945
+ # SOLUTION_TYPE_RECOMMENDATION.
8946
+ class GoogleCloudDiscoveryengineV1ServingConfigMediaConfig
8947
+ include Google::Apis::Core::Hashable
8948
+
8949
+ # Specifies the content freshness used for recommendation result. Contents will
8950
+ # be demoted if contents were published for more than content freshness cutoff
8951
+ # days.
8952
+ # Corresponds to the JSON property `contentFreshnessCutoffDays`
8953
+ # @return [Fixnum]
8954
+ attr_accessor :content_freshness_cutoff_days
8955
+
8956
+ # Specifies the content watched percentage threshold for demotion. Threshold
8957
+ # value must be between [0, 1.0] inclusive.
8958
+ # Corresponds to the JSON property `contentWatchedPercentageThreshold`
8959
+ # @return [Float]
8960
+ attr_accessor :content_watched_percentage_threshold
8961
+
8962
+ # Specifies the content watched minutes threshold for demotion.
8963
+ # Corresponds to the JSON property `contentWatchedSecondsThreshold`
8964
+ # @return [Float]
8965
+ attr_accessor :content_watched_seconds_threshold
8966
+
8967
+ # Optional. Specifies the number of days to look back for demoting watched
8968
+ # content. If set to zero or unset, defaults to the maximum of 365 days.
8969
+ # Corresponds to the JSON property `demoteContentWatchedPastDays`
8970
+ # @return [Fixnum]
8971
+ attr_accessor :demote_content_watched_past_days
8972
+
8973
+ # Specifies the event type used for demoting recommendation result. Currently
8974
+ # supported values: * `view-item`: Item viewed. * `media-play`: Start/resume
8975
+ # watching a video, playing a song, etc. * `media-complete`: Finished or stopped
8976
+ # midway through a video, song, etc. If unset, watch history demotion will not
8977
+ # be applied. Content freshness demotion will still be applied.
8978
+ # Corresponds to the JSON property `demotionEventType`
8979
+ # @return [String]
8980
+ attr_accessor :demotion_event_type
8981
+
8982
+ def initialize(**args)
8983
+ update!(**args)
8984
+ end
8985
+
8986
+ # Update properties of this object
8987
+ def update!(**args)
8988
+ @content_freshness_cutoff_days = args[:content_freshness_cutoff_days] if args.key?(:content_freshness_cutoff_days)
8989
+ @content_watched_percentage_threshold = args[:content_watched_percentage_threshold] if args.key?(:content_watched_percentage_threshold)
8990
+ @content_watched_seconds_threshold = args[:content_watched_seconds_threshold] if args.key?(:content_watched_seconds_threshold)
8991
+ @demote_content_watched_past_days = args[:demote_content_watched_past_days] if args.key?(:demote_content_watched_past_days)
8992
+ @demotion_event_type = args[:demotion_event_type] if args.key?(:demotion_event_type)
8993
+ end
8994
+ end
8995
+
8619
8996
  # External session proto definition.
8620
8997
  class GoogleCloudDiscoveryengineV1Session
8621
8998
  include Google::Apis::Core::Hashable
8622
8999
 
9000
+ # Optional. The display name of the session. This field is used to identify the
9001
+ # session in the UI. By default, the display name is the first turn query text
9002
+ # in the session.
9003
+ # Corresponds to the JSON property `displayName`
9004
+ # @return [String]
9005
+ attr_accessor :display_name
9006
+
8623
9007
  # Output only. The time the session finished.
8624
9008
  # Corresponds to the JSON property `endTime`
8625
9009
  # @return [String]
8626
9010
  attr_accessor :end_time
8627
9011
 
9012
+ # Optional. Whether the session is pinned, pinned session will be displayed on
9013
+ # the top of the session list.
9014
+ # Corresponds to the JSON property `isPinned`
9015
+ # @return [Boolean]
9016
+ attr_accessor :is_pinned
9017
+ alias_method :is_pinned?, :is_pinned
9018
+
8628
9019
  # Immutable. Fully qualified name `projects/`project`/locations/global/
8629
9020
  # collections/`collection`/engines/`engine`/sessions/*`
8630
9021
  # Corresponds to the JSON property `name`
@@ -8657,7 +9048,9 @@ module Google
8657
9048
 
8658
9049
  # Update properties of this object
8659
9050
  def update!(**args)
9051
+ @display_name = args[:display_name] if args.key?(:display_name)
8660
9052
  @end_time = args[:end_time] if args.key?(:end_time)
9053
+ @is_pinned = args[:is_pinned] if args.key?(:is_pinned)
8661
9054
  @name = args[:name] if args.key?(:name)
8662
9055
  @start_time = args[:start_time] if args.key?(:start_time)
8663
9056
  @state = args[:state] if args.key?(:state)
@@ -9664,6 +10057,17 @@ module Google
9664
10057
  # @return [String]
9665
10058
  attr_accessor :create_time
9666
10059
 
10060
+ # A score in the range of [0, 1] describing how grounded the answer is by the
10061
+ # reference chunks.
10062
+ # Corresponds to the JSON property `groundingScore`
10063
+ # @return [Float]
10064
+ attr_accessor :grounding_score
10065
+
10066
+ # Optional. Grounding supports.
10067
+ # Corresponds to the JSON property `groundingSupports`
10068
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport>]
10069
+ attr_accessor :grounding_supports
10070
+
9667
10071
  # Immutable. Fully qualified name `projects/`project`/locations/global/
9668
10072
  # collections/`collection`/engines/`engine`/sessions/*/answers/*`
9669
10073
  # Corresponds to the JSON property `name`
@@ -9706,6 +10110,8 @@ module Google
9706
10110
  @citations = args[:citations] if args.key?(:citations)
9707
10111
  @complete_time = args[:complete_time] if args.key?(:complete_time)
9708
10112
  @create_time = args[:create_time] if args.key?(:create_time)
10113
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
10114
+ @grounding_supports = args[:grounding_supports] if args.key?(:grounding_supports)
9709
10115
  @name = args[:name] if args.key?(:name)
9710
10116
  @query_understanding_info = args[:query_understanding_info] if args.key?(:query_understanding_info)
9711
10117
  @references = args[:references] if args.key?(:references)
@@ -9765,6 +10171,56 @@ module Google
9765
10171
  end
9766
10172
  end
9767
10173
 
10174
+ # Grounding support for a claim in `answer_text`.
10175
+ class GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport
10176
+ include Google::Apis::Core::Hashable
10177
+
10178
+ # Required. End of the claim, exclusive.
10179
+ # Corresponds to the JSON property `endIndex`
10180
+ # @return [Fixnum]
10181
+ attr_accessor :end_index
10182
+
10183
+ # Indicates that this claim required grounding check. When the system decided
10184
+ # this claim didn't require attribution/grounding check, this field is set to
10185
+ # false. In that case, no grounding check was done for the claim and therefore `
10186
+ # grounding_score`, `sources` is not returned.
10187
+ # Corresponds to the JSON property `groundingCheckRequired`
10188
+ # @return [Boolean]
10189
+ attr_accessor :grounding_check_required
10190
+ alias_method :grounding_check_required?, :grounding_check_required
10191
+
10192
+ # A score in the range of [0, 1] describing how grounded is a specific claim by
10193
+ # the references. Higher value means that the claim is better supported by the
10194
+ # reference chunks.
10195
+ # Corresponds to the JSON property `groundingScore`
10196
+ # @return [Float]
10197
+ attr_accessor :grounding_score
10198
+
10199
+ # Optional. Citation sources for the claim.
10200
+ # Corresponds to the JSON property `sources`
10201
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1alphaAnswerCitationSource>]
10202
+ attr_accessor :sources
10203
+
10204
+ # Required. Index indicates the start of the claim, measured in bytes (UTF-8
10205
+ # unicode).
10206
+ # Corresponds to the JSON property `startIndex`
10207
+ # @return [Fixnum]
10208
+ attr_accessor :start_index
10209
+
10210
+ def initialize(**args)
10211
+ update!(**args)
10212
+ end
10213
+
10214
+ # Update properties of this object
10215
+ def update!(**args)
10216
+ @end_index = args[:end_index] if args.key?(:end_index)
10217
+ @grounding_check_required = args[:grounding_check_required] if args.key?(:grounding_check_required)
10218
+ @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
10219
+ @sources = args[:sources] if args.key?(:sources)
10220
+ @start_index = args[:start_index] if args.key?(:start_index)
10221
+ end
10222
+ end
10223
+
9768
10224
  # Query understanding information.
9769
10225
  class GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo
9770
10226
  include Google::Apis::Core::Hashable
@@ -11240,6 +11696,27 @@ module Google
11240
11696
  end
11241
11697
  end
11242
11698
 
11699
+ # Request for DeleteSession method.
11700
+ class GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest
11701
+ include Google::Apis::Core::Hashable
11702
+
11703
+ # Required. The resource name of the Session to delete. Format: `projects/`
11704
+ # project`/locations/`location`/collections/`collection`/dataStores/`
11705
+ # data_store_id`/sessions/`session_id``
11706
+ # Corresponds to the JSON property `name`
11707
+ # @return [String]
11708
+ attr_accessor :name
11709
+
11710
+ def initialize(**args)
11711
+ update!(**args)
11712
+ end
11713
+
11714
+ # Update properties of this object
11715
+ def update!(**args)
11716
+ @name = args[:name] if args.key?(:name)
11717
+ end
11718
+ end
11719
+
11243
11720
  # Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap
11244
11721
  # operation. This will be returned by the google.longrunning.Operation.metadata
11245
11722
  # field.
@@ -12308,6 +12785,35 @@ module Google
12308
12785
  end
12309
12786
  end
12310
12787
 
12788
+ # Request for GetSession method.
12789
+ class GoogleCloudDiscoveryengineV1alphaGetSessionRequest
12790
+ include Google::Apis::Core::Hashable
12791
+
12792
+ # Optional. If set to true, the full session including all answer details will
12793
+ # be returned.
12794
+ # Corresponds to the JSON property `includeAnswerDetails`
12795
+ # @return [Boolean]
12796
+ attr_accessor :include_answer_details
12797
+ alias_method :include_answer_details?, :include_answer_details
12798
+
12799
+ # Required. The resource name of the Session to get. Format: `projects/`project`/
12800
+ # locations/`location`/collections/`collection`/dataStores/`data_store_id`/
12801
+ # sessions/`session_id``
12802
+ # Corresponds to the JSON property `name`
12803
+ # @return [String]
12804
+ attr_accessor :name
12805
+
12806
+ def initialize(**args)
12807
+ update!(**args)
12808
+ end
12809
+
12810
+ # Update properties of this object
12811
+ def update!(**args)
12812
+ @include_answer_details = args[:include_answer_details] if args.key?(:include_answer_details)
12813
+ @name = args[:name] if args.key?(:name)
12814
+ end
12815
+ end
12816
+
12311
12817
  # Response message for SiteSearchEngineService.GetUriPatternDocumentData method.
12312
12818
  class GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse
12313
12819
  include Google::Apis::Core::Hashable
@@ -12838,6 +13344,82 @@ module Google
12838
13344
  end
12839
13345
  end
12840
13346
 
13347
+ # Request for ListSessions method.
13348
+ class GoogleCloudDiscoveryengineV1alphaListSessionsRequest
13349
+ include Google::Apis::Core::Hashable
13350
+
13351
+ # A filter to apply on the list results. The supported features are:
13352
+ # user_pseudo_id, state. Example: "user_pseudo_id = some_id"
13353
+ # Corresponds to the JSON property `filter`
13354
+ # @return [String]
13355
+ attr_accessor :filter
13356
+
13357
+ # A comma-separated list of fields to order by, sorted in ascending order. Use "
13358
+ # desc" after a field name for descending. Supported fields: * `update_time` * `
13359
+ # create_time` * `session_name` * `is_pinned` Example: * "update_time desc" * "
13360
+ # create_time" * "is_pinned desc,update_time desc": list sessions by is_pinned
13361
+ # first, then by update_time.
13362
+ # Corresponds to the JSON property `orderBy`
13363
+ # @return [String]
13364
+ attr_accessor :order_by
13365
+
13366
+ # Maximum number of results to return. If unspecified, defaults to 50. Max
13367
+ # allowed value is 1000.
13368
+ # Corresponds to the JSON property `pageSize`
13369
+ # @return [Fixnum]
13370
+ attr_accessor :page_size
13371
+
13372
+ # A page token, received from a previous `ListSessions` call. Provide this to
13373
+ # retrieve the subsequent page.
13374
+ # Corresponds to the JSON property `pageToken`
13375
+ # @return [String]
13376
+ attr_accessor :page_token
13377
+
13378
+ # Required. The data store resource name. Format: `projects/`project`/locations/`
13379
+ # location`/collections/`collection`/dataStores/`data_store_id``
13380
+ # Corresponds to the JSON property `parent`
13381
+ # @return [String]
13382
+ attr_accessor :parent
13383
+
13384
+ def initialize(**args)
13385
+ update!(**args)
13386
+ end
13387
+
13388
+ # Update properties of this object
13389
+ def update!(**args)
13390
+ @filter = args[:filter] if args.key?(:filter)
13391
+ @order_by = args[:order_by] if args.key?(:order_by)
13392
+ @page_size = args[:page_size] if args.key?(:page_size)
13393
+ @page_token = args[:page_token] if args.key?(:page_token)
13394
+ @parent = args[:parent] if args.key?(:parent)
13395
+ end
13396
+ end
13397
+
13398
+ # Response for ListSessions method.
13399
+ class GoogleCloudDiscoveryengineV1alphaListSessionsResponse
13400
+ include Google::Apis::Core::Hashable
13401
+
13402
+ # Pagination token, if not returned indicates the last page.
13403
+ # Corresponds to the JSON property `nextPageToken`
13404
+ # @return [String]
13405
+ attr_accessor :next_page_token
13406
+
13407
+ # All the Sessions for a given data store.
13408
+ # Corresponds to the JSON property `sessions`
13409
+ # @return [Array<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1alphaSession>]
13410
+ attr_accessor :sessions
13411
+
13412
+ def initialize(**args)
13413
+ update!(**args)
13414
+ end
13415
+
13416
+ # Update properties of this object
13417
+ def update!(**args)
13418
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
13419
+ @sessions = args[:sessions] if args.key?(:sessions)
13420
+ end
13421
+ end
13422
+
12841
13423
  # Configuration for Natural Language Query Understanding.
12842
13424
  class GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig
12843
13425
  include Google::Apis::Core::Hashable
@@ -14440,6 +15022,11 @@ module Google
14440
15022
  class GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec
14441
15023
  include Google::Apis::Core::Hashable
14442
15024
 
15025
+ # Boost specification to boost certain documents.
15026
+ # Corresponds to the JSON property `boostSpec`
15027
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec]
15028
+ attr_accessor :boost_spec
15029
+
14443
15030
  # Required. Full resource name of DataStore, such as `projects/`project`/
14444
15031
  # locations/`location`/collections/`collection_id`/dataStores/`data_store_id``.
14445
15032
  # Corresponds to the JSON property `dataStore`
@@ -14459,6 +15046,7 @@ module Google
14459
15046
 
14460
15047
  # Update properties of this object
14461
15048
  def update!(**args)
15049
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
14462
15050
  @data_store = args[:data_store] if args.key?(:data_store)
14463
15051
  @filter = args[:filter] if args.key?(:filter)
14464
15052
  end
@@ -14841,11 +15429,25 @@ module Google
14841
15429
  class GoogleCloudDiscoveryengineV1alphaSession
14842
15430
  include Google::Apis::Core::Hashable
14843
15431
 
15432
+ # Optional. The display name of the session. This field is used to identify the
15433
+ # session in the UI. By default, the display name is the first turn query text
15434
+ # in the session.
15435
+ # Corresponds to the JSON property `displayName`
15436
+ # @return [String]
15437
+ attr_accessor :display_name
15438
+
14844
15439
  # Output only. The time the session finished.
14845
15440
  # Corresponds to the JSON property `endTime`
14846
15441
  # @return [String]
14847
15442
  attr_accessor :end_time
14848
15443
 
15444
+ # Optional. Whether the session is pinned, pinned session will be displayed on
15445
+ # the top of the session list.
15446
+ # Corresponds to the JSON property `isPinned`
15447
+ # @return [Boolean]
15448
+ attr_accessor :is_pinned
15449
+ alias_method :is_pinned?, :is_pinned
15450
+
14849
15451
  # Immutable. Fully qualified name `projects/`project`/locations/global/
14850
15452
  # collections/`collection`/engines/`engine`/sessions/*`
14851
15453
  # Corresponds to the JSON property `name`
@@ -14878,7 +15480,9 @@ module Google
14878
15480
 
14879
15481
  # Update properties of this object
14880
15482
  def update!(**args)
15483
+ @display_name = args[:display_name] if args.key?(:display_name)
14881
15484
  @end_time = args[:end_time] if args.key?(:end_time)
15485
+ @is_pinned = args[:is_pinned] if args.key?(:is_pinned)
14882
15486
  @name = args[:name] if args.key?(:name)
14883
15487
  @start_time = args[:start_time] if args.key?(:start_time)
14884
15488
  @state = args[:state] if args.key?(:state)
@@ -15305,6 +15909,33 @@ module Google
15305
15909
  end
15306
15910
  end
15307
15911
 
15912
+ # Request for UpdateSession method.
15913
+ class GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest
15914
+ include Google::Apis::Core::Hashable
15915
+
15916
+ # External session proto definition.
15917
+ # Corresponds to the JSON property `session`
15918
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1alphaSession]
15919
+ attr_accessor :session
15920
+
15921
+ # Indicates which fields in the provided Session to update. The following are
15922
+ # NOT supported: * Session.name If not set or empty, all supported fields are
15923
+ # updated.
15924
+ # Corresponds to the JSON property `updateMask`
15925
+ # @return [String]
15926
+ attr_accessor :update_mask
15927
+
15928
+ def initialize(**args)
15929
+ update!(**args)
15930
+ end
15931
+
15932
+ # Update properties of this object
15933
+ def update!(**args)
15934
+ @session = args[:session] if args.key?(:session)
15935
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
15936
+ end
15937
+ end
15938
+
15308
15939
  # Metadata related to the progress of the SiteSearchEngineService.
15309
15940
  # UpdateTargetSite operation. This will be returned by the google.longrunning.
15310
15941
  # Operation.metadata field.
@@ -18740,6 +19371,11 @@ module Google
18740
19371
  class GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec
18741
19372
  include Google::Apis::Core::Hashable
18742
19373
 
19374
+ # Boost specification to boost certain documents.
19375
+ # Corresponds to the JSON property `boostSpec`
19376
+ # @return [Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec]
19377
+ attr_accessor :boost_spec
19378
+
18743
19379
  # Required. Full resource name of DataStore, such as `projects/`project`/
18744
19380
  # locations/`location`/collections/`collection_id`/dataStores/`data_store_id``.
18745
19381
  # Corresponds to the JSON property `dataStore`
@@ -18759,6 +19395,7 @@ module Google
18759
19395
 
18760
19396
  # Update properties of this object
18761
19397
  def update!(**args)
19398
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
18762
19399
  @data_store = args[:data_store] if args.key?(:data_store)
18763
19400
  @filter = args[:filter] if args.key?(:filter)
18764
19401
  end