google-cloud-discovery_engine-v1 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
  6. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +764 -6
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +715 -6
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
  22. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +23 -13
  23. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  24. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -13
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  26. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  30. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  37. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  46. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  53. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
  56. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
  57. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  58. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  59. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  60. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  61. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +15 -8
  62. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +15 -8
  63. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  64. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  65. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  66. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  67. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  68. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  69. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  70. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  71. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  72. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
  73. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  74. data/lib/google/cloud/discovery_engine/v1.rb +4 -0
  75. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  76. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  77. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  78. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  79. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  80. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  81. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  82. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
  83. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
  84. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  85. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  86. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  87. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  88. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  89. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  90. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  91. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  92. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  93. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  94. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  95. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  96. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  97. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  98. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  99. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
  100. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
  101. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  102. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  103. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  104. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +485 -0
  105. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
  106. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  107. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
  108. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
  109. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
  110. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  111. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  112. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +4 -4
  113. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
  117. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  118. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +23 -18
  119. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
  122. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  123. metadata +56 -2
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module DiscoveryEngine
24
+ module V1
25
+ module ControlService
26
+ # Credentials for the ControlService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "GOOGLE_CLOUD_CREDENTIALS",
33
+ "GOOGLE_CLOUD_KEYFILE",
34
+ "GCLOUD_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
36
+ "GOOGLE_CLOUD_KEYFILE_JSON",
37
+ "GCLOUD_KEYFILE_JSON"
38
+ ]
39
+ self.paths = [
40
+ "~/.config/google_cloud/application_default_credentials.json"
41
+ ]
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,167 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module DiscoveryEngine
23
+ module V1
24
+ module ControlService
25
+ # Path helper methods for the ControlService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Control resource string.
29
+ #
30
+ # @overload control_path(project:, location:, data_store:, control:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}`
34
+ #
35
+ # @param project [String]
36
+ # @param location [String]
37
+ # @param data_store [String]
38
+ # @param control [String]
39
+ #
40
+ # @overload control_path(project:, location:, collection:, data_store:, control:)
41
+ # The resource will be in the following format:
42
+ #
43
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}`
44
+ #
45
+ # @param project [String]
46
+ # @param location [String]
47
+ # @param collection [String]
48
+ # @param data_store [String]
49
+ # @param control [String]
50
+ #
51
+ # @overload control_path(project:, location:, collection:, engine:, control:)
52
+ # The resource will be in the following format:
53
+ #
54
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/controls/{control}`
55
+ #
56
+ # @param project [String]
57
+ # @param location [String]
58
+ # @param collection [String]
59
+ # @param engine [String]
60
+ # @param control [String]
61
+ #
62
+ # @return [::String]
63
+ def control_path **args
64
+ resources = {
65
+ "control:data_store:location:project" => (proc do |project:, location:, data_store:, control:|
66
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
67
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
68
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
69
+
70
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/controls/#{control}"
71
+ end),
72
+ "collection:control:data_store:location:project" => (proc do |project:, location:, collection:, data_store:, control:|
73
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
74
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
75
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
76
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
77
+
78
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/controls/#{control}"
79
+ end),
80
+ "collection:control:engine:location:project" => (proc do |project:, location:, collection:, engine:, control:|
81
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
82
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
83
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
84
+ raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/"
85
+
86
+ "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/controls/#{control}"
87
+ end)
88
+ }
89
+
90
+ resource = resources[args.keys.sort.join(":")]
91
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
92
+ resource.call(**args)
93
+ end
94
+
95
+ ##
96
+ # Create a fully-qualified DataStore resource string.
97
+ #
98
+ # @overload data_store_path(project:, location:, data_store:)
99
+ # The resource will be in the following format:
100
+ #
101
+ # `projects/{project}/locations/{location}/dataStores/{data_store}`
102
+ #
103
+ # @param project [String]
104
+ # @param location [String]
105
+ # @param data_store [String]
106
+ #
107
+ # @overload data_store_path(project:, location:, collection:, data_store:)
108
+ # The resource will be in the following format:
109
+ #
110
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
111
+ #
112
+ # @param project [String]
113
+ # @param location [String]
114
+ # @param collection [String]
115
+ # @param data_store [String]
116
+ #
117
+ # @return [::String]
118
+ def data_store_path **args
119
+ resources = {
120
+ "data_store:location:project" => (proc do |project:, location:, data_store:|
121
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
122
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
123
+
124
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}"
125
+ end),
126
+ "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:|
127
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
128
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
129
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
130
+
131
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}"
132
+ end)
133
+ }
134
+
135
+ resource = resources[args.keys.sort.join(":")]
136
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
137
+ resource.call(**args)
138
+ end
139
+
140
+ ##
141
+ # Create a fully-qualified Engine resource string.
142
+ #
143
+ # The resource will be in the following format:
144
+ #
145
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
146
+ #
147
+ # @param project [String]
148
+ # @param location [String]
149
+ # @param collection [String]
150
+ # @param engine [String]
151
+ #
152
+ # @return [::String]
153
+ def engine_path project:, location:, collection:, engine:
154
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
155
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
156
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
157
+
158
+ "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}"
159
+ end
160
+
161
+ extend self
162
+ end
163
+ end
164
+ end
165
+ end
166
+ end
167
+ end