google-cloud-discovery_engine-v1beta 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +742 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +693 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +48 -23
- data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +48 -23
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +296 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +275 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +449 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +416 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +459 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +426 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/rest.rb +2 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +11 -6
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +11 -6
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1beta.rb +2 -0
- data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +67 -0
- data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
- data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
- data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
- data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
- data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +354 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +9 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +475 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +3 -5
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +4 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +106 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +76 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +310 -24
- data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +99 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +154 -22
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +16 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +85 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +1 -1
- metadata +28 -2
@@ -530,7 +530,7 @@ module Google
|
|
530
530
|
# @param options [::Gapic::CallOptions, ::Hash]
|
531
531
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
532
532
|
#
|
533
|
-
# @overload update_document(document: nil, allow_missing: nil)
|
533
|
+
# @overload update_document(document: nil, allow_missing: nil, update_mask: nil)
|
534
534
|
# Pass arguments to `update_document` via keyword arguments. Note that at
|
535
535
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
536
536
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -551,6 +551,9 @@ module Google
|
|
551
551
|
# {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} is not found, a
|
552
552
|
# new {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} will be
|
553
553
|
# created.
|
554
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
555
|
+
# Indicates which fields in the provided imported 'document' to update. If
|
556
|
+
# not set, will by default update all fields.
|
554
557
|
#
|
555
558
|
# @yield [response, operation] Access the result along with the RPC operation
|
556
559
|
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Document]
|
@@ -729,7 +732,7 @@ module Google
|
|
729
732
|
# @param options [::Gapic::CallOptions, ::Hash]
|
730
733
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
731
734
|
#
|
732
|
-
# @overload import_documents(inline_source: nil, gcs_source: nil, bigquery_source: nil, parent: nil, error_config: nil, reconciliation_mode: nil, auto_generate_ids: nil, id_field: nil)
|
735
|
+
# @overload import_documents(inline_source: nil, gcs_source: nil, bigquery_source: nil, fhir_store_source: nil, spanner_source: nil, cloud_sql_source: nil, firestore_source: nil, bigtable_source: nil, parent: nil, error_config: nil, reconciliation_mode: nil, update_mask: nil, auto_generate_ids: nil, id_field: nil)
|
733
736
|
# Pass arguments to `import_documents` via keyword arguments. Note that at
|
734
737
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
735
738
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -740,6 +743,16 @@ module Google
|
|
740
743
|
# Cloud Storage location for the input content.
|
741
744
|
# @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash]
|
742
745
|
# BigQuery input source.
|
746
|
+
# @param fhir_store_source [::Google::Cloud::DiscoveryEngine::V1beta::FhirStoreSource, ::Hash]
|
747
|
+
# FhirStore input source.
|
748
|
+
# @param spanner_source [::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource, ::Hash]
|
749
|
+
# Spanner input source.
|
750
|
+
# @param cloud_sql_source [::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource, ::Hash]
|
751
|
+
# Cloud SQL input source.
|
752
|
+
# @param firestore_source [::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource, ::Hash]
|
753
|
+
# Firestore input source.
|
754
|
+
# @param bigtable_source [::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource, ::Hash]
|
755
|
+
# Cloud Bigtable input source.
|
743
756
|
# @param parent [::String]
|
744
757
|
# Required. The parent branch resource name, such as
|
745
758
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
|
@@ -750,6 +763,9 @@ module Google
|
|
750
763
|
# The mode of reconciliation between existing documents and the documents to
|
751
764
|
# be imported. Defaults to
|
752
765
|
# {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
|
766
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
767
|
+
# Indicates which fields in the provided imported documents to update. If
|
768
|
+
# not set, the default is to update all fields.
|
753
769
|
# @param auto_generate_ids [::Boolean]
|
754
770
|
# Whether to automatically generate IDs for the documents if absent.
|
755
771
|
#
|
@@ -764,45 +780,54 @@ module Google
|
|
764
780
|
# {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#id_field id_field},
|
765
781
|
# otherwise, documents without IDs fail to be imported.
|
766
782
|
#
|
767
|
-
#
|
768
|
-
#
|
769
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::
|
770
|
-
# when
|
783
|
+
# Supported data sources:
|
784
|
+
#
|
785
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource}.
|
771
786
|
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
|
772
|
-
# or
|
787
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
788
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}.
|
773
789
|
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
|
774
|
-
#
|
790
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
791
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource SpannerSource}.
|
792
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource CloudSqlSource}.
|
793
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource FirestoreSource}.
|
794
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource BigtableSource}.
|
775
795
|
# @param id_field [::String]
|
776
|
-
# The field
|
777
|
-
#
|
796
|
+
# The field indicates the ID field or column to be used as unique IDs of
|
797
|
+
# the documents.
|
778
798
|
#
|
779
799
|
# For {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} it is the
|
780
800
|
# key of the JSON field. For instance, `my_id` for JSON `{"my_id":
|
781
|
-
# "some_uuid"}`. For
|
782
|
-
#
|
783
|
-
# the column name of the BigQuery table where the unique ids are stored.
|
801
|
+
# "some_uuid"}`. For others, it may be the column name of the table where the
|
802
|
+
# unique ids are stored.
|
784
803
|
#
|
785
|
-
# The values of the JSON field or the
|
804
|
+
# The values of the JSON field or the table column are used as the
|
786
805
|
# {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}s. The JSON
|
787
|
-
# field or the
|
806
|
+
# field or the table column must be of string type, and the values must be
|
788
807
|
# set as valid strings conform to
|
789
808
|
# [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
|
790
809
|
# Otherwise, documents without valid IDs fail to be imported.
|
791
810
|
#
|
792
|
-
# Only set this field when
|
793
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} or
|
794
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}, and
|
795
|
-
# when
|
796
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
|
797
|
-
# or
|
798
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
|
799
|
-
# is `custom`. And only set this field when
|
811
|
+
# Only set this field when
|
800
812
|
# {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#auto_generate_ids auto_generate_ids}
|
801
813
|
# is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
802
814
|
#
|
803
815
|
# If it is unset, a default value `_id` is used when importing from the
|
804
816
|
# allowed data sources.
|
805
817
|
#
|
818
|
+
# Supported data sources:
|
819
|
+
#
|
820
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource}.
|
821
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
|
822
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
823
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}.
|
824
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
|
825
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
826
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource SpannerSource}.
|
827
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource CloudSqlSource}.
|
828
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource FirestoreSource}.
|
829
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource BigtableSource}.
|
830
|
+
#
|
806
831
|
# @yield [response, operation] Access the result along with the RPC operation
|
807
832
|
# @yieldparam response [::Gapic::Operation]
|
808
833
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
@@ -126,6 +126,27 @@ module Google
|
|
126
126
|
resource.call(**args)
|
127
127
|
end
|
128
128
|
|
129
|
+
##
|
130
|
+
# Create a fully-qualified FhirStore resource string.
|
131
|
+
#
|
132
|
+
# The resource will be in the following format:
|
133
|
+
#
|
134
|
+
# `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`
|
135
|
+
#
|
136
|
+
# @param project [String]
|
137
|
+
# @param location [String]
|
138
|
+
# @param dataset [String]
|
139
|
+
# @param fhir_store [String]
|
140
|
+
#
|
141
|
+
# @return [::String]
|
142
|
+
def fhir_store_path project:, location:, dataset:, fhir_store:
|
143
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
144
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
145
|
+
raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/"
|
146
|
+
|
147
|
+
"projects/#{project}/locations/#{location}/datasets/#{dataset}/fhirStores/#{fhir_store}"
|
148
|
+
end
|
149
|
+
|
129
150
|
extend self
|
130
151
|
end
|
131
152
|
end
|
@@ -502,7 +502,7 @@ module Google
|
|
502
502
|
# @param options [::Gapic::CallOptions, ::Hash]
|
503
503
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
504
504
|
#
|
505
|
-
# @overload update_document(document: nil, allow_missing: nil)
|
505
|
+
# @overload update_document(document: nil, allow_missing: nil, update_mask: nil)
|
506
506
|
# Pass arguments to `update_document` via keyword arguments. Note that at
|
507
507
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
508
508
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -523,6 +523,9 @@ module Google
|
|
523
523
|
# {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} is not found, a
|
524
524
|
# new {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} will be
|
525
525
|
# created.
|
526
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
527
|
+
# Indicates which fields in the provided imported 'document' to update. If
|
528
|
+
# not set, will by default update all fields.
|
526
529
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
527
530
|
# @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Document]
|
528
531
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -687,7 +690,7 @@ module Google
|
|
687
690
|
# @param options [::Gapic::CallOptions, ::Hash]
|
688
691
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
689
692
|
#
|
690
|
-
# @overload import_documents(inline_source: nil, gcs_source: nil, bigquery_source: nil, parent: nil, error_config: nil, reconciliation_mode: nil, auto_generate_ids: nil, id_field: nil)
|
693
|
+
# @overload import_documents(inline_source: nil, gcs_source: nil, bigquery_source: nil, fhir_store_source: nil, spanner_source: nil, cloud_sql_source: nil, firestore_source: nil, bigtable_source: nil, parent: nil, error_config: nil, reconciliation_mode: nil, update_mask: nil, auto_generate_ids: nil, id_field: nil)
|
691
694
|
# Pass arguments to `import_documents` via keyword arguments. Note that at
|
692
695
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
693
696
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -698,6 +701,16 @@ module Google
|
|
698
701
|
# Cloud Storage location for the input content.
|
699
702
|
# @param bigquery_source [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource, ::Hash]
|
700
703
|
# BigQuery input source.
|
704
|
+
# @param fhir_store_source [::Google::Cloud::DiscoveryEngine::V1beta::FhirStoreSource, ::Hash]
|
705
|
+
# FhirStore input source.
|
706
|
+
# @param spanner_source [::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource, ::Hash]
|
707
|
+
# Spanner input source.
|
708
|
+
# @param cloud_sql_source [::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource, ::Hash]
|
709
|
+
# Cloud SQL input source.
|
710
|
+
# @param firestore_source [::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource, ::Hash]
|
711
|
+
# Firestore input source.
|
712
|
+
# @param bigtable_source [::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource, ::Hash]
|
713
|
+
# Cloud Bigtable input source.
|
701
714
|
# @param parent [::String]
|
702
715
|
# Required. The parent branch resource name, such as
|
703
716
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
|
@@ -708,6 +721,9 @@ module Google
|
|
708
721
|
# The mode of reconciliation between existing documents and the documents to
|
709
722
|
# be imported. Defaults to
|
710
723
|
# {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
|
724
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
725
|
+
# Indicates which fields in the provided imported documents to update. If
|
726
|
+
# not set, the default is to update all fields.
|
711
727
|
# @param auto_generate_ids [::Boolean]
|
712
728
|
# Whether to automatically generate IDs for the documents if absent.
|
713
729
|
#
|
@@ -722,44 +738,53 @@ module Google
|
|
722
738
|
# {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#id_field id_field},
|
723
739
|
# otherwise, documents without IDs fail to be imported.
|
724
740
|
#
|
725
|
-
#
|
726
|
-
#
|
727
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::
|
728
|
-
# when
|
741
|
+
# Supported data sources:
|
742
|
+
#
|
743
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource}.
|
729
744
|
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
|
730
|
-
# or
|
745
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
746
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}.
|
731
747
|
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
|
732
|
-
#
|
748
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
749
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource SpannerSource}.
|
750
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource CloudSqlSource}.
|
751
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource FirestoreSource}.
|
752
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource BigtableSource}.
|
733
753
|
# @param id_field [::String]
|
734
|
-
# The field
|
735
|
-
#
|
754
|
+
# The field indicates the ID field or column to be used as unique IDs of
|
755
|
+
# the documents.
|
736
756
|
#
|
737
757
|
# For {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} it is the
|
738
758
|
# key of the JSON field. For instance, `my_id` for JSON `{"my_id":
|
739
|
-
# "some_uuid"}`. For
|
740
|
-
#
|
741
|
-
# the column name of the BigQuery table where the unique ids are stored.
|
759
|
+
# "some_uuid"}`. For others, it may be the column name of the table where the
|
760
|
+
# unique ids are stored.
|
742
761
|
#
|
743
|
-
# The values of the JSON field or the
|
762
|
+
# The values of the JSON field or the table column are used as the
|
744
763
|
# {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}s. The JSON
|
745
|
-
# field or the
|
764
|
+
# field or the table column must be of string type, and the values must be
|
746
765
|
# set as valid strings conform to
|
747
766
|
# [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
|
748
767
|
# Otherwise, documents without valid IDs fail to be imported.
|
749
768
|
#
|
750
|
-
# Only set this field when
|
751
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} or
|
752
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}, and
|
753
|
-
# when
|
754
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
|
755
|
-
# or
|
756
|
-
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
|
757
|
-
# is `custom`. And only set this field when
|
769
|
+
# Only set this field when
|
758
770
|
# {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#auto_generate_ids auto_generate_ids}
|
759
771
|
# is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
760
772
|
#
|
761
773
|
# If it is unset, a default value `_id` is used when importing from the
|
762
774
|
# allowed data sources.
|
775
|
+
#
|
776
|
+
# Supported data sources:
|
777
|
+
#
|
778
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource}.
|
779
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
|
780
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
781
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource}.
|
782
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
|
783
|
+
# must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
784
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::SpannerSource SpannerSource}.
|
785
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::CloudSqlSource CloudSqlSource}.
|
786
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::FirestoreSource FirestoreSource}.
|
787
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::BigtableSource BigtableSource}.
|
763
788
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
764
789
|
# @yieldparam result [::Gapic::Operation]
|
765
790
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -683,6 +683,281 @@ module Google
|
|
683
683
|
raise ::Google::Cloud::Error.from_error(e)
|
684
684
|
end
|
685
685
|
|
686
|
+
##
|
687
|
+
# Pauses the training of an existing engine. Only applicable if
|
688
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType SolutionType} is
|
689
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType::SOLUTION_TYPE_RECOMMENDATION SOLUTION_TYPE_RECOMMENDATION}.
|
690
|
+
#
|
691
|
+
# @overload pause_engine(request, options = nil)
|
692
|
+
# Pass arguments to `pause_engine` via a request object, either of type
|
693
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::PauseEngineRequest} or an equivalent Hash.
|
694
|
+
#
|
695
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::PauseEngineRequest, ::Hash]
|
696
|
+
# A request object representing the call parameters. Required. To specify no
|
697
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
698
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
699
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
700
|
+
#
|
701
|
+
# @overload pause_engine(name: nil)
|
702
|
+
# Pass arguments to `pause_engine` via keyword arguments. Note that at
|
703
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
704
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
705
|
+
#
|
706
|
+
# @param name [::String]
|
707
|
+
# Required. The name of the engine to pause.
|
708
|
+
# Format:
|
709
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
710
|
+
#
|
711
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
712
|
+
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Engine]
|
713
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
714
|
+
#
|
715
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Engine]
|
716
|
+
#
|
717
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
718
|
+
#
|
719
|
+
# @example Basic example
|
720
|
+
# require "google/cloud/discovery_engine/v1beta"
|
721
|
+
#
|
722
|
+
# # Create a client object. The client can be reused for multiple calls.
|
723
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::EngineService::Client.new
|
724
|
+
#
|
725
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
726
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::PauseEngineRequest.new
|
727
|
+
#
|
728
|
+
# # Call the pause_engine method.
|
729
|
+
# result = client.pause_engine request
|
730
|
+
#
|
731
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Engine.
|
732
|
+
# p result
|
733
|
+
#
|
734
|
+
def pause_engine request, options = nil
|
735
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
736
|
+
|
737
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::PauseEngineRequest
|
738
|
+
|
739
|
+
# Converts hash and nil to an options object
|
740
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
741
|
+
|
742
|
+
# Customize the options with defaults
|
743
|
+
metadata = @config.rpcs.pause_engine.metadata.to_h
|
744
|
+
|
745
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
746
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
747
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
748
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
749
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
750
|
+
|
751
|
+
header_params = {}
|
752
|
+
if request.name
|
753
|
+
header_params["name"] = request.name
|
754
|
+
end
|
755
|
+
|
756
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
757
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
758
|
+
|
759
|
+
options.apply_defaults timeout: @config.rpcs.pause_engine.timeout,
|
760
|
+
metadata: metadata,
|
761
|
+
retry_policy: @config.rpcs.pause_engine.retry_policy
|
762
|
+
|
763
|
+
options.apply_defaults timeout: @config.timeout,
|
764
|
+
metadata: @config.metadata,
|
765
|
+
retry_policy: @config.retry_policy
|
766
|
+
|
767
|
+
@engine_service_stub.call_rpc :pause_engine, request, options: options do |response, operation|
|
768
|
+
yield response, operation if block_given?
|
769
|
+
return response
|
770
|
+
end
|
771
|
+
rescue ::GRPC::BadStatus => e
|
772
|
+
raise ::Google::Cloud::Error.from_error(e)
|
773
|
+
end
|
774
|
+
|
775
|
+
##
|
776
|
+
# Resumes the training of an existing engine. Only applicable if
|
777
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType SolutionType} is
|
778
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType::SOLUTION_TYPE_RECOMMENDATION SOLUTION_TYPE_RECOMMENDATION}.
|
779
|
+
#
|
780
|
+
# @overload resume_engine(request, options = nil)
|
781
|
+
# Pass arguments to `resume_engine` via a request object, either of type
|
782
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::ResumeEngineRequest} or an equivalent Hash.
|
783
|
+
#
|
784
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::ResumeEngineRequest, ::Hash]
|
785
|
+
# A request object representing the call parameters. Required. To specify no
|
786
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
787
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
788
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
789
|
+
#
|
790
|
+
# @overload resume_engine(name: nil)
|
791
|
+
# Pass arguments to `resume_engine` via keyword arguments. Note that at
|
792
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
793
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
794
|
+
#
|
795
|
+
# @param name [::String]
|
796
|
+
# Required. The name of the engine to resume.
|
797
|
+
# Format:
|
798
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
799
|
+
#
|
800
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
801
|
+
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Engine]
|
802
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
803
|
+
#
|
804
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Engine]
|
805
|
+
#
|
806
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
807
|
+
#
|
808
|
+
# @example Basic example
|
809
|
+
# require "google/cloud/discovery_engine/v1beta"
|
810
|
+
#
|
811
|
+
# # Create a client object. The client can be reused for multiple calls.
|
812
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::EngineService::Client.new
|
813
|
+
#
|
814
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
815
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::ResumeEngineRequest.new
|
816
|
+
#
|
817
|
+
# # Call the resume_engine method.
|
818
|
+
# result = client.resume_engine request
|
819
|
+
#
|
820
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Engine.
|
821
|
+
# p result
|
822
|
+
#
|
823
|
+
def resume_engine request, options = nil
|
824
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
825
|
+
|
826
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ResumeEngineRequest
|
827
|
+
|
828
|
+
# Converts hash and nil to an options object
|
829
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
830
|
+
|
831
|
+
# Customize the options with defaults
|
832
|
+
metadata = @config.rpcs.resume_engine.metadata.to_h
|
833
|
+
|
834
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
835
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
836
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
837
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
838
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
839
|
+
|
840
|
+
header_params = {}
|
841
|
+
if request.name
|
842
|
+
header_params["name"] = request.name
|
843
|
+
end
|
844
|
+
|
845
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
846
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
847
|
+
|
848
|
+
options.apply_defaults timeout: @config.rpcs.resume_engine.timeout,
|
849
|
+
metadata: metadata,
|
850
|
+
retry_policy: @config.rpcs.resume_engine.retry_policy
|
851
|
+
|
852
|
+
options.apply_defaults timeout: @config.timeout,
|
853
|
+
metadata: @config.metadata,
|
854
|
+
retry_policy: @config.retry_policy
|
855
|
+
|
856
|
+
@engine_service_stub.call_rpc :resume_engine, request, options: options do |response, operation|
|
857
|
+
yield response, operation if block_given?
|
858
|
+
return response
|
859
|
+
end
|
860
|
+
rescue ::GRPC::BadStatus => e
|
861
|
+
raise ::Google::Cloud::Error.from_error(e)
|
862
|
+
end
|
863
|
+
|
864
|
+
##
|
865
|
+
# Tunes an existing engine. Only applicable if
|
866
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType SolutionType} is
|
867
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SolutionType::SOLUTION_TYPE_RECOMMENDATION SOLUTION_TYPE_RECOMMENDATION}.
|
868
|
+
#
|
869
|
+
# @overload tune_engine(request, options = nil)
|
870
|
+
# Pass arguments to `tune_engine` via a request object, either of type
|
871
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TuneEngineRequest} or an equivalent Hash.
|
872
|
+
#
|
873
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::TuneEngineRequest, ::Hash]
|
874
|
+
# A request object representing the call parameters. Required. To specify no
|
875
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
876
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
877
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
878
|
+
#
|
879
|
+
# @overload tune_engine(name: nil)
|
880
|
+
# Pass arguments to `tune_engine` via keyword arguments. Note that at
|
881
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
882
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
883
|
+
#
|
884
|
+
# @param name [::String]
|
885
|
+
# Required. The resource name of the engine to tune.
|
886
|
+
# Format:
|
887
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
888
|
+
#
|
889
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
890
|
+
# @yieldparam response [::Gapic::Operation]
|
891
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
892
|
+
#
|
893
|
+
# @return [::Gapic::Operation]
|
894
|
+
#
|
895
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
896
|
+
#
|
897
|
+
# @example Basic example
|
898
|
+
# require "google/cloud/discovery_engine/v1beta"
|
899
|
+
#
|
900
|
+
# # Create a client object. The client can be reused for multiple calls.
|
901
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::EngineService::Client.new
|
902
|
+
#
|
903
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
904
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::TuneEngineRequest.new
|
905
|
+
#
|
906
|
+
# # Call the tune_engine method.
|
907
|
+
# result = client.tune_engine request
|
908
|
+
#
|
909
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
910
|
+
# # check the status of an operation, cancel it, or wait for results.
|
911
|
+
# # Here is how to wait for a response.
|
912
|
+
# result.wait_until_done! timeout: 60
|
913
|
+
# if result.response?
|
914
|
+
# p result.response
|
915
|
+
# else
|
916
|
+
# puts "No response received."
|
917
|
+
# end
|
918
|
+
#
|
919
|
+
def tune_engine request, options = nil
|
920
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
921
|
+
|
922
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::TuneEngineRequest
|
923
|
+
|
924
|
+
# Converts hash and nil to an options object
|
925
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
926
|
+
|
927
|
+
# Customize the options with defaults
|
928
|
+
metadata = @config.rpcs.tune_engine.metadata.to_h
|
929
|
+
|
930
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
931
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
932
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
933
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
934
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
935
|
+
|
936
|
+
header_params = {}
|
937
|
+
if request.name
|
938
|
+
header_params["name"] = request.name
|
939
|
+
end
|
940
|
+
|
941
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
942
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
943
|
+
|
944
|
+
options.apply_defaults timeout: @config.rpcs.tune_engine.timeout,
|
945
|
+
metadata: metadata,
|
946
|
+
retry_policy: @config.rpcs.tune_engine.retry_policy
|
947
|
+
|
948
|
+
options.apply_defaults timeout: @config.timeout,
|
949
|
+
metadata: @config.metadata,
|
950
|
+
retry_policy: @config.retry_policy
|
951
|
+
|
952
|
+
@engine_service_stub.call_rpc :tune_engine, request, options: options do |response, operation|
|
953
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
954
|
+
yield response, operation if block_given?
|
955
|
+
return response
|
956
|
+
end
|
957
|
+
rescue ::GRPC::BadStatus => e
|
958
|
+
raise ::Google::Cloud::Error.from_error(e)
|
959
|
+
end
|
960
|
+
|
686
961
|
##
|
687
962
|
# Configuration class for the EngineService API.
|
688
963
|
#
|
@@ -861,6 +1136,21 @@ module Google
|
|
861
1136
|
# @return [::Gapic::Config::Method]
|
862
1137
|
#
|
863
1138
|
attr_reader :list_engines
|
1139
|
+
##
|
1140
|
+
# RPC-specific configuration for `pause_engine`
|
1141
|
+
# @return [::Gapic::Config::Method]
|
1142
|
+
#
|
1143
|
+
attr_reader :pause_engine
|
1144
|
+
##
|
1145
|
+
# RPC-specific configuration for `resume_engine`
|
1146
|
+
# @return [::Gapic::Config::Method]
|
1147
|
+
#
|
1148
|
+
attr_reader :resume_engine
|
1149
|
+
##
|
1150
|
+
# RPC-specific configuration for `tune_engine`
|
1151
|
+
# @return [::Gapic::Config::Method]
|
1152
|
+
#
|
1153
|
+
attr_reader :tune_engine
|
864
1154
|
|
865
1155
|
# @private
|
866
1156
|
def initialize parent_rpcs = nil
|
@@ -874,6 +1164,12 @@ module Google
|
|
874
1164
|
@get_engine = ::Gapic::Config::Method.new get_engine_config
|
875
1165
|
list_engines_config = parent_rpcs.list_engines if parent_rpcs.respond_to? :list_engines
|
876
1166
|
@list_engines = ::Gapic::Config::Method.new list_engines_config
|
1167
|
+
pause_engine_config = parent_rpcs.pause_engine if parent_rpcs.respond_to? :pause_engine
|
1168
|
+
@pause_engine = ::Gapic::Config::Method.new pause_engine_config
|
1169
|
+
resume_engine_config = parent_rpcs.resume_engine if parent_rpcs.respond_to? :resume_engine
|
1170
|
+
@resume_engine = ::Gapic::Config::Method.new resume_engine_config
|
1171
|
+
tune_engine_config = parent_rpcs.tune_engine if parent_rpcs.respond_to? :tune_engine
|
1172
|
+
@tune_engine = ::Gapic::Config::Method.new tune_engine_config
|
877
1173
|
|
878
1174
|
yield self if block_given?
|
879
1175
|
end
|