@google-cloud/discoveryengine 1.10.0 → 1.11.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +30 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation.proto +232 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation_service.proto +252 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +83 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query.proto +86 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_service.proto +264 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set.proto +64 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set_service.proto +258 -0
  10. package/build/protos/google/cloud/discoveryengine/v1beta/chunk.proto +119 -0
  11. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +0 -5
  12. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +10 -2
  13. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
  14. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +37 -2
  15. package/build/protos/google/cloud/discoveryengine/v1beta/evaluation.proto +231 -0
  16. package/build/protos/google/cloud/discoveryengine/v1beta/evaluation_service.proto +252 -0
  17. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +83 -0
  18. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query.proto +86 -0
  19. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_service.proto +264 -0
  20. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set.proto +64 -0
  21. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto +256 -0
  22. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +67 -8
  23. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +11 -5
  24. package/build/protos/protos.d.ts +28997 -20222
  25. package/build/protos/protos.js +74749 -54453
  26. package/build/protos/protos.json +6933 -4764
  27. package/build/src/v1alpha/acl_config_service_client.d.ts +108 -0
  28. package/build/src/v1alpha/acl_config_service_client.js +157 -0
  29. package/build/src/v1alpha/chunk_service_client.d.ts +108 -0
  30. package/build/src/v1alpha/chunk_service_client.js +157 -0
  31. package/build/src/v1alpha/completion_service_client.d.ts +108 -0
  32. package/build/src/v1alpha/completion_service_client.js +157 -0
  33. package/build/src/v1alpha/control_service_client.d.ts +108 -0
  34. package/build/src/v1alpha/control_service_client.js +157 -0
  35. package/build/src/v1alpha/conversational_search_service_client.d.ts +108 -0
  36. package/build/src/v1alpha/conversational_search_service_client.js +157 -0
  37. package/build/src/v1alpha/data_store_service_client.d.ts +108 -0
  38. package/build/src/v1alpha/data_store_service_client.js +157 -0
  39. package/build/src/v1alpha/document_service_client.d.ts +108 -0
  40. package/build/src/v1alpha/document_service_client.js +157 -0
  41. package/build/src/v1alpha/engine_service_client.d.ts +108 -0
  42. package/build/src/v1alpha/engine_service_client.js +157 -0
  43. package/build/src/v1alpha/estimate_billing_service_client.d.ts +108 -0
  44. package/build/src/v1alpha/estimate_billing_service_client.js +157 -0
  45. package/build/src/v1alpha/evaluation_service_client.d.ts +2349 -0
  46. package/build/src/v1alpha/evaluation_service_client.js +3288 -0
  47. package/build/src/v1alpha/evaluation_service_client_config.json +58 -0
  48. package/build/src/v1alpha/grounded_generation_service_client.d.ts +108 -0
  49. package/build/src/v1alpha/grounded_generation_service_client.js +157 -0
  50. package/build/src/v1alpha/index.d.ts +3 -0
  51. package/build/src/v1alpha/index.js +7 -1
  52. package/build/src/v1alpha/project_service_client.d.ts +108 -0
  53. package/build/src/v1alpha/project_service_client.js +157 -0
  54. package/build/src/v1alpha/rank_service_client.d.ts +108 -0
  55. package/build/src/v1alpha/rank_service_client.js +157 -0
  56. package/build/src/v1alpha/recommendation_service_client.d.ts +108 -0
  57. package/build/src/v1alpha/recommendation_service_client.js +157 -0
  58. package/build/src/v1alpha/sample_query_service_client.d.ts +2317 -0
  59. package/build/src/v1alpha/sample_query_service_client.js +3186 -0
  60. package/build/src/v1alpha/sample_query_service_client_config.json +68 -0
  61. package/build/src/v1alpha/sample_query_set_service_client.d.ts +2176 -0
  62. package/build/src/v1alpha/sample_query_set_service_client.js +2931 -0
  63. package/build/src/v1alpha/sample_query_set_service_client_config.json +63 -0
  64. package/build/src/v1alpha/schema_service_client.d.ts +108 -0
  65. package/build/src/v1alpha/schema_service_client.js +157 -0
  66. package/build/src/v1alpha/search_service_client.d.ts +108 -0
  67. package/build/src/v1alpha/search_service_client.js +157 -0
  68. package/build/src/v1alpha/search_tuning_service_client.d.ts +108 -0
  69. package/build/src/v1alpha/search_tuning_service_client.js +157 -0
  70. package/build/src/v1alpha/serving_config_service_client.d.ts +108 -0
  71. package/build/src/v1alpha/serving_config_service_client.js +157 -0
  72. package/build/src/v1alpha/site_search_engine_service_client.d.ts +108 -0
  73. package/build/src/v1alpha/site_search_engine_service_client.js +157 -0
  74. package/build/src/v1alpha/user_event_service_client.d.ts +108 -0
  75. package/build/src/v1alpha/user_event_service_client.js +157 -0
  76. package/build/src/v1beta/completion_service_client.d.ts +237 -0
  77. package/build/src/v1beta/completion_service_client.js +339 -0
  78. package/build/src/v1beta/control_service_client.d.ts +237 -0
  79. package/build/src/v1beta/control_service_client.js +333 -0
  80. package/build/src/v1beta/conversational_search_service_client.d.ts +237 -0
  81. package/build/src/v1beta/conversational_search_service_client.js +333 -0
  82. package/build/src/v1beta/data_store_service_client.d.ts +237 -0
  83. package/build/src/v1beta/data_store_service_client.js +339 -0
  84. package/build/src/v1beta/document_service_client.d.ts +237 -0
  85. package/build/src/v1beta/document_service_client.js +339 -0
  86. package/build/src/v1beta/engine_service_client.d.ts +237 -0
  87. package/build/src/v1beta/engine_service_client.js +339 -0
  88. package/build/src/v1beta/evaluation_service_client.d.ts +2325 -0
  89. package/build/src/v1beta/evaluation_service_client.js +3252 -0
  90. package/build/src/v1beta/evaluation_service_client_config.json +58 -0
  91. package/build/src/v1beta/grounded_generation_service_client.d.ts +237 -0
  92. package/build/src/v1beta/grounded_generation_service_client.js +333 -0
  93. package/build/src/v1beta/index.d.ts +3 -0
  94. package/build/src/v1beta/index.js +7 -1
  95. package/build/src/v1beta/project_service_client.d.ts +237 -0
  96. package/build/src/v1beta/project_service_client.js +339 -0
  97. package/build/src/v1beta/rank_service_client.d.ts +237 -0
  98. package/build/src/v1beta/rank_service_client.js +333 -0
  99. package/build/src/v1beta/recommendation_service_client.d.ts +237 -0
  100. package/build/src/v1beta/recommendation_service_client.js +333 -0
  101. package/build/src/v1beta/sample_query_service_client.d.ts +2293 -0
  102. package/build/src/v1beta/sample_query_service_client.js +3150 -0
  103. package/build/src/v1beta/sample_query_service_client_config.json +68 -0
  104. package/build/src/v1beta/sample_query_set_service_client.d.ts +2150 -0
  105. package/build/src/v1beta/sample_query_set_service_client.js +2895 -0
  106. package/build/src/v1beta/sample_query_set_service_client_config.json +63 -0
  107. package/build/src/v1beta/schema_service_client.d.ts +237 -0
  108. package/build/src/v1beta/schema_service_client.js +339 -0
  109. package/build/src/v1beta/search_service_client.d.ts +267 -12
  110. package/build/src/v1beta/search_service_client.js +353 -8
  111. package/build/src/v1beta/search_tuning_service_client.d.ts +237 -0
  112. package/build/src/v1beta/search_tuning_service_client.js +339 -0
  113. package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
  114. package/build/src/v1beta/serving_config_service_client.js +333 -0
  115. package/build/src/v1beta/site_search_engine_service_client.d.ts +237 -0
  116. package/build/src/v1beta/site_search_engine_service_client.js +339 -0
  117. package/build/src/v1beta/user_event_service_client.d.ts +237 -0
  118. package/build/src/v1beta/user_event_service_client.js +339 -0
  119. package/package.json +1 -1
@@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
20
20
  import "google/api/resource.proto";
21
21
  import "google/cloud/discoveryengine/v1alpha/completion.proto";
22
22
  import "google/cloud/discoveryengine/v1alpha/document.proto";
23
+ import "google/cloud/discoveryengine/v1alpha/sample_query.proto";
23
24
  import "google/cloud/discoveryengine/v1alpha/user_event.proto";
24
25
  import "google/protobuf/field_mask.proto";
25
26
  import "google/protobuf/timestamp.proto";
@@ -664,3 +665,85 @@ message ImportSuggestionDenyListEntriesMetadata {
664
665
  // finish time.
665
666
  google.protobuf.Timestamp update_time = 2;
666
667
  }
668
+
669
+ // Request message for
670
+ // [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries]
671
+ // method.
672
+ message ImportSampleQueriesRequest {
673
+ // The inline source for
674
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s.
675
+ message InlineSource {
676
+ // Required. A list of
677
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s to
678
+ // import. Max of 1000 items.
679
+ repeated SampleQuery sample_queries = 1
680
+ [(google.api.field_behavior) = REQUIRED];
681
+ }
682
+
683
+ // The source of the sample queries.
684
+ oneof source {
685
+ // The Inline source for sample query entries.
686
+ InlineSource inline_source = 2;
687
+
688
+ // Cloud Storage location for the input content.
689
+ GcsSource gcs_source = 3;
690
+
691
+ // BigQuery input source.
692
+ BigQuerySource bigquery_source = 4;
693
+ }
694
+
695
+ // Required. The parent sample query set resource name, such as
696
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
697
+ //
698
+ // If the caller does not have permission to list
699
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s under this
700
+ // sample query set, regardless of whether or not this sample query set
701
+ // exists, a `PERMISSION_DENIED` error is returned.
702
+ string parent = 1 [
703
+ (google.api.field_behavior) = REQUIRED,
704
+ (google.api.resource_reference) = {
705
+ type: "discoveryengine.googleapis.com/SampleQuerySet"
706
+ }
707
+ ];
708
+
709
+ // The desired location of errors incurred during the Import.
710
+ ImportErrorConfig error_config = 5;
711
+ }
712
+
713
+ // Response of the
714
+ // [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries]
715
+ // method. If the long running operation is done, this message is returned by
716
+ // the google.longrunning.Operations.response field if the operation is
717
+ // successful.
718
+ message ImportSampleQueriesResponse {
719
+ // A sample of errors encountered while processing the request.
720
+ repeated google.rpc.Status error_samples = 1;
721
+
722
+ // The desired location of errors incurred during the Import.
723
+ ImportErrorConfig error_config = 2;
724
+ }
725
+
726
+ // Metadata related to the progress of the ImportSampleQueries
727
+ // operation. This will be returned by the google.longrunning.Operation.metadata
728
+ // field.
729
+ message ImportSampleQueriesMetadata {
730
+ // ImportSampleQueries operation create time.
731
+ google.protobuf.Timestamp create_time = 1;
732
+
733
+ // ImportSampleQueries operation last update time. If the operation is done,
734
+ // this is also the finish time.
735
+ google.protobuf.Timestamp update_time = 2;
736
+
737
+ // Count of [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s
738
+ // successfully imported.
739
+ int64 success_count = 3;
740
+
741
+ // Count of [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s
742
+ // that failed to be imported.
743
+ int64 failure_count = 4;
744
+
745
+ // Total count of
746
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s that were
747
+ // processed.
748
+ int64 total_count = 5;
749
+ }
@@ -0,0 +1,86 @@
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/timestamp.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "SampleQueryProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
31
+
32
+ // Sample Query captures metadata to be used for evaluation.
33
+ message SampleQuery {
34
+ option (google.api.resource) = {
35
+ type: "discoveryengine.googleapis.com/SampleQuery"
36
+ pattern: "projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}"
37
+ };
38
+
39
+ // Query Entry captures metadata to be used for search evaluation.
40
+ message QueryEntry {
41
+ // Defines the parameters of the query's expected outcome.
42
+ message Target {
43
+ // Expected uri of the target.
44
+ //
45
+ // This field must be a UTF-8 encoded string with a length limit of 2048
46
+ // characters.
47
+ //
48
+ // Example of valid uris: `https://example.com/abc`,
49
+ // `gcs://example/example.pdf`.
50
+ string uri = 1;
51
+
52
+ // Expected page numbers of the target.
53
+ //
54
+ // Each page number must be non negative.
55
+ repeated int32 page_numbers = 2;
56
+
57
+ // Relevance score of the target.
58
+ optional double score = 3;
59
+ }
60
+
61
+ // Required. The query.
62
+ string query = 1 [(google.api.field_behavior) = REQUIRED];
63
+
64
+ // List of targets for the query.
65
+ repeated Target targets = 3;
66
+ }
67
+
68
+ // The content of the sample query.
69
+ oneof content {
70
+ // The query entry.
71
+ QueryEntry query_entry = 2;
72
+ }
73
+
74
+ // Identifier. The full resource name of the sample query, in the format of
75
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`.
76
+ //
77
+ // This field must be a UTF-8 encoded string with a length limit of 1024
78
+ // characters.
79
+ string name = 1 [(google.api.field_behavior) = IDENTIFIER];
80
+
81
+ // Output only. Timestamp the
82
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] was created
83
+ // at.
84
+ google.protobuf.Timestamp create_time = 3
85
+ [(google.api.field_behavior) = OUTPUT_ONLY];
86
+ }
@@ -0,0 +1,264 @@
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1alpha/import_config.proto";
24
+ import "google/cloud/discoveryengine/v1alpha/sample_query.proto";
25
+ import "google/longrunning/operations.proto";
26
+ import "google/protobuf/empty.proto";
27
+ import "google/protobuf/field_mask.proto";
28
+
29
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
30
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
31
+ option java_multiple_files = true;
32
+ option java_outer_classname = "SampleQueryServiceProto";
33
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
34
+ option objc_class_prefix = "DISCOVERYENGINE";
35
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
36
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
37
+
38
+ // Service for managing
39
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s,
40
+ service SampleQueryService {
41
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
42
+ option (google.api.oauth_scopes) =
43
+ "https://www.googleapis.com/auth/cloud-platform";
44
+
45
+ // Gets a [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery].
46
+ rpc GetSampleQuery(GetSampleQueryRequest) returns (SampleQuery) {
47
+ option (google.api.http) = {
48
+ get: "/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/sampleQueries/*}"
49
+ };
50
+ option (google.api.method_signature) = "name";
51
+ }
52
+
53
+ // Gets a list of
54
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s.
55
+ rpc ListSampleQueries(ListSampleQueriesRequest)
56
+ returns (ListSampleQueriesResponse) {
57
+ option (google.api.http) = {
58
+ get: "/v1alpha/{parent=projects/*/locations/*/sampleQuerySets/*}/sampleQueries"
59
+ };
60
+ option (google.api.method_signature) = "parent";
61
+ }
62
+
63
+ // Creates a [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]
64
+ rpc CreateSampleQuery(CreateSampleQueryRequest) returns (SampleQuery) {
65
+ option (google.api.http) = {
66
+ post: "/v1alpha/{parent=projects/*/locations/*/sampleQuerySets/*}/sampleQueries"
67
+ body: "sample_query"
68
+ };
69
+ option (google.api.method_signature) =
70
+ "parent,sample_query,sample_query_id";
71
+ }
72
+
73
+ // Updates a [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery].
74
+ rpc UpdateSampleQuery(UpdateSampleQueryRequest) returns (SampleQuery) {
75
+ option (google.api.http) = {
76
+ patch: "/v1alpha/{sample_query.name=projects/*/locations/*/sampleQuerySets/*/sampleQueries/*}"
77
+ body: "sample_query"
78
+ };
79
+ option (google.api.method_signature) = "sample_query,update_mask";
80
+ }
81
+
82
+ // Deletes a [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery].
83
+ rpc DeleteSampleQuery(DeleteSampleQueryRequest)
84
+ returns (google.protobuf.Empty) {
85
+ option (google.api.http) = {
86
+ delete: "/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/sampleQueries/*}"
87
+ };
88
+ option (google.api.method_signature) = "name";
89
+ }
90
+
91
+ // Bulk import of multiple
92
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s. Sample
93
+ // queries that already exist may be deleted.
94
+ //
95
+ // Note: It is possible for a subset of the
96
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s to be
97
+ // successfully imported.
98
+ rpc ImportSampleQueries(ImportSampleQueriesRequest)
99
+ returns (google.longrunning.Operation) {
100
+ option (google.api.http) = {
101
+ post: "/v1alpha/{parent=projects/*/locations/*/sampleQuerySets/*}/sampleQueries:import"
102
+ body: "*"
103
+ };
104
+ option (google.longrunning.operation_info) = {
105
+ response_type: "google.cloud.discoveryengine.v1alpha.ImportSampleQueriesResponse"
106
+ metadata_type: "google.cloud.discoveryengine.v1alpha.ImportSampleQueriesMetadata"
107
+ };
108
+ }
109
+ }
110
+
111
+ // Request message for
112
+ // [SampleQueryService.GetSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.GetSampleQuery]
113
+ // method.
114
+ message GetSampleQueryRequest {
115
+ // Required. Full resource name of
116
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], such as
117
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`.
118
+ //
119
+ // If the caller does not have permission to access the
120
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], regardless
121
+ // of whether or not it exists, a PERMISSION_DENIED error is returned.
122
+ //
123
+ // If the requested
124
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] does not
125
+ // exist, a NOT_FOUND error is returned.
126
+ string name = 1 [
127
+ (google.api.field_behavior) = REQUIRED,
128
+ (google.api.resource_reference) = {
129
+ type: "discoveryengine.googleapis.com/SampleQuery"
130
+ }
131
+ ];
132
+ }
133
+
134
+ // Request message for
135
+ // [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries]
136
+ // method.
137
+ message ListSampleQueriesRequest {
138
+ // Required. The parent sample query set resource name, such as
139
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
140
+ //
141
+ // If the caller does not have permission to list
142
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s under this
143
+ // sample query set, regardless of whether or not this sample query set
144
+ // exists, a `PERMISSION_DENIED` error is returned.
145
+ string parent = 1 [
146
+ (google.api.field_behavior) = REQUIRED,
147
+ (google.api.resource_reference) = {
148
+ type: "discoveryengine.googleapis.com/SampleQuerySet"
149
+ }
150
+ ];
151
+
152
+ // Maximum number of
153
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s to return.
154
+ // If unspecified, defaults to 100. The maximum allowed value is 1000. Values
155
+ // above 1000 will be coerced to 1000.
156
+ //
157
+ // If this field is negative, an `INVALID_ARGUMENT` error is returned.
158
+ int32 page_size = 2;
159
+
160
+ // A page token
161
+ // [ListSampleQueriesResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListSampleQueriesResponse.next_page_token],
162
+ // received from a previous
163
+ // [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries]
164
+ // call. Provide this to retrieve the subsequent page.
165
+ //
166
+ // When paginating, all other parameters provided to
167
+ // [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries]
168
+ // must match the call that provided the page token. Otherwise, an
169
+ // `INVALID_ARGUMENT` error is returned.
170
+ string page_token = 3;
171
+ }
172
+
173
+ // Response message for
174
+ // [SampleQueryService.ListSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ListSampleQueries]
175
+ // method.
176
+ message ListSampleQueriesResponse {
177
+ // The [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s.
178
+ repeated SampleQuery sample_queries = 1;
179
+
180
+ // A token that can be sent as
181
+ // [ListSampleQueriesRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest.page_token]
182
+ // to retrieve the next page. If this field is omitted, there are no
183
+ // subsequent pages.
184
+ string next_page_token = 2;
185
+ }
186
+
187
+ // Request message for
188
+ // [SampleQueryService.CreateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.CreateSampleQuery]
189
+ // method.
190
+ message CreateSampleQueryRequest {
191
+ // Required. The parent resource name, such as
192
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
193
+ string parent = 1 [
194
+ (google.api.field_behavior) = REQUIRED,
195
+ (google.api.resource_reference) = {
196
+ type: "discoveryengine.googleapis.com/SampleQuerySet"
197
+ }
198
+ ];
199
+
200
+ // Required. The
201
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] to create.
202
+ SampleQuery sample_query = 2 [(google.api.field_behavior) = REQUIRED];
203
+
204
+ // Required. The ID to use for the
205
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], which will
206
+ // become the final component of the
207
+ // [SampleQuery.name][google.cloud.discoveryengine.v1alpha.SampleQuery.name].
208
+ //
209
+ // If the caller does not have permission to create the
210
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], regardless
211
+ // of whether or not it exists, a `PERMISSION_DENIED` error is returned.
212
+ //
213
+ // This field must be unique among all
214
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s with the
215
+ // same
216
+ // [parent][google.cloud.discoveryengine.v1alpha.CreateSampleQueryRequest.parent].
217
+ // Otherwise, an `ALREADY_EXISTS` error is returned.
218
+ //
219
+ // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
220
+ // standard with a length limit of 63 characters. Otherwise, an
221
+ // `INVALID_ARGUMENT` error is returned.
222
+ string sample_query_id = 3 [(google.api.field_behavior) = REQUIRED];
223
+ }
224
+
225
+ // Request message for
226
+ // [SampleQueryService.UpdateSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.UpdateSampleQuery]
227
+ // method.
228
+ message UpdateSampleQueryRequest {
229
+ // Required. The simple query to update.
230
+ //
231
+ // If the caller does not have permission to update the
232
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], regardless
233
+ // of whether or not it exists, a `PERMISSION_DENIED` error is returned.
234
+ //
235
+ // If the [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] to
236
+ // update does not exist a `NOT_FOUND` error is returned.
237
+ SampleQuery sample_query = 1 [(google.api.field_behavior) = REQUIRED];
238
+
239
+ // Indicates which fields in the provided imported 'simple query' to update.
240
+ // If not set, will by default update all fields.
241
+ google.protobuf.FieldMask update_mask = 2;
242
+ }
243
+
244
+ // Request message for
245
+ // [SampleQueryService.DeleteSampleQuery][google.cloud.discoveryengine.v1alpha.SampleQueryService.DeleteSampleQuery]
246
+ // method.
247
+ message DeleteSampleQueryRequest {
248
+ // Required. Full resource name of
249
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], such as
250
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`.
251
+ //
252
+ // If the caller does not have permission to delete the
253
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery], regardless
254
+ // of whether or not it exists, a `PERMISSION_DENIED` error is returned.
255
+ //
256
+ // If the [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] to
257
+ // delete does not exist, a `NOT_FOUND` error is returned.
258
+ string name = 1 [
259
+ (google.api.field_behavior) = REQUIRED,
260
+ (google.api.resource_reference) = {
261
+ type: "discoveryengine.googleapis.com/SampleQuery"
262
+ }
263
+ ];
264
+ }
@@ -0,0 +1,64 @@
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/timestamp.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "SampleQuerySetProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
31
+
32
+ // A SampleQuerySet is the parent resource of SampleQuery, and contains the
33
+ // configurations shared by all SampleQuery under it.
34
+ message SampleQuerySet {
35
+ option (google.api.resource) = {
36
+ type: "discoveryengine.googleapis.com/SampleQuerySet"
37
+ pattern: "projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}"
38
+ };
39
+
40
+ // Identifier. The full resource name of the
41
+ // [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet], in
42
+ // the format of
43
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}`.
44
+ //
45
+ // This field must be a UTF-8 encoded string with a length limit of 1024
46
+ // characters.
47
+ string name = 1 [(google.api.field_behavior) = IDENTIFIER];
48
+
49
+ // Required. The sample query set display name.
50
+ //
51
+ // This field must be a UTF-8 encoded string with a length limit of 128
52
+ // characters.
53
+ string display_name = 2 [(google.api.field_behavior) = REQUIRED];
54
+
55
+ // Output only. Timestamp the
56
+ // [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet] was
57
+ // created at.
58
+ google.protobuf.Timestamp create_time = 3
59
+ [(google.api.field_behavior) = OUTPUT_ONLY];
60
+
61
+ // The description of the
62
+ // [SampleQuerySet][google.cloud.discoveryengine.v1alpha.SampleQuerySet].
63
+ string description = 4;
64
+ }