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
@@ -24,6 +24,137 @@ module Google
24
24
  module ConversationalSearchService
25
25
  # Path helper methods for the ConversationalSearchService API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified Answer resource string.
29
+ #
30
+ # @overload answer_path(project:, location:, data_store:, session:, answer:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}`
34
+ #
35
+ # @param project [String]
36
+ # @param location [String]
37
+ # @param data_store [String]
38
+ # @param session [String]
39
+ # @param answer [String]
40
+ #
41
+ # @overload answer_path(project:, location:, collection:, data_store:, session:, answer:)
42
+ # The resource will be in the following format:
43
+ #
44
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}`
45
+ #
46
+ # @param project [String]
47
+ # @param location [String]
48
+ # @param collection [String]
49
+ # @param data_store [String]
50
+ # @param session [String]
51
+ # @param answer [String]
52
+ #
53
+ # @overload answer_path(project:, location:, collection:, engine:, session:, answer:)
54
+ # The resource will be in the following format:
55
+ #
56
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}`
57
+ #
58
+ # @param project [String]
59
+ # @param location [String]
60
+ # @param collection [String]
61
+ # @param engine [String]
62
+ # @param session [String]
63
+ # @param answer [String]
64
+ #
65
+ # @return [::String]
66
+ def answer_path **args
67
+ resources = {
68
+ "answer:data_store:location:project:session" => (proc do |project:, location:, data_store:, session:, answer:|
69
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
70
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
71
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
72
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
73
+
74
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}"
75
+ end),
76
+ "answer:collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:, answer:|
77
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
78
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
79
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
80
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
81
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
82
+
83
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}"
84
+ end),
85
+ "answer:collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:, answer:|
86
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
87
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
88
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
89
+ raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/"
90
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
91
+
92
+ "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}/answers/#{answer}"
93
+ end)
94
+ }
95
+
96
+ resource = resources[args.keys.sort.join(":")]
97
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
98
+ resource.call(**args)
99
+ end
100
+
101
+ ##
102
+ # Create a fully-qualified Chunk resource string.
103
+ #
104
+ # @overload chunk_path(project:, location:, data_store:, branch:, document:, chunk:)
105
+ # The resource will be in the following format:
106
+ #
107
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`
108
+ #
109
+ # @param project [String]
110
+ # @param location [String]
111
+ # @param data_store [String]
112
+ # @param branch [String]
113
+ # @param document [String]
114
+ # @param chunk [String]
115
+ #
116
+ # @overload chunk_path(project:, location:, collection:, data_store:, branch:, document:, chunk:)
117
+ # The resource will be in the following format:
118
+ #
119
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`
120
+ #
121
+ # @param project [String]
122
+ # @param location [String]
123
+ # @param collection [String]
124
+ # @param data_store [String]
125
+ # @param branch [String]
126
+ # @param document [String]
127
+ # @param chunk [String]
128
+ #
129
+ # @return [::String]
130
+ def chunk_path **args
131
+ resources = {
132
+ "branch:chunk:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:, chunk:|
133
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
134
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
135
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
136
+ raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/"
137
+ raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/"
138
+
139
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}"
140
+ end),
141
+ "branch:chunk:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:, chunk:|
142
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
143
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
144
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
145
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
146
+ raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/"
147
+ raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/"
148
+
149
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}"
150
+ end)
151
+ }
152
+
153
+ resource = resources[args.keys.sort.join(":")]
154
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
155
+ resource.call(**args)
156
+ end
157
+
27
158
  ##
28
159
  # Create a fully-qualified Conversation resource string.
29
160
  #
@@ -258,6 +389,74 @@ module Google
258
389
  resource.call(**args)
259
390
  end
260
391
 
392
+ ##
393
+ # Create a fully-qualified Session resource string.
394
+ #
395
+ # @overload session_path(project:, location:, data_store:, session:)
396
+ # The resource will be in the following format:
397
+ #
398
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}`
399
+ #
400
+ # @param project [String]
401
+ # @param location [String]
402
+ # @param data_store [String]
403
+ # @param session [String]
404
+ #
405
+ # @overload session_path(project:, location:, collection:, data_store:, session:)
406
+ # The resource will be in the following format:
407
+ #
408
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}`
409
+ #
410
+ # @param project [String]
411
+ # @param location [String]
412
+ # @param collection [String]
413
+ # @param data_store [String]
414
+ # @param session [String]
415
+ #
416
+ # @overload session_path(project:, location:, collection:, engine:, session:)
417
+ # The resource will be in the following format:
418
+ #
419
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
420
+ #
421
+ # @param project [String]
422
+ # @param location [String]
423
+ # @param collection [String]
424
+ # @param engine [String]
425
+ # @param session [String]
426
+ #
427
+ # @return [::String]
428
+ def session_path **args
429
+ resources = {
430
+ "data_store:location:project:session" => (proc do |project:, location:, data_store:, session:|
431
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
432
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
433
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
434
+
435
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}"
436
+ end),
437
+ "collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:|
438
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
439
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
440
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
441
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
442
+
443
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}"
444
+ end),
445
+ "collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:|
446
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
447
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
448
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
449
+ raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/"
450
+
451
+ "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}"
452
+ end)
453
+ }
454
+
455
+ resource = resources[args.keys.sort.join(":")]
456
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
457
+ resource.call(**args)
458
+ end
459
+
261
460
  extend self
262
461
  end
263
462
  end