document.proto 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.discoveryengine.v1beta;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/struct.proto";
  19. option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "DocumentProto";
  23. option java_package = "com.google.cloud.discoveryengine.v1beta";
  24. option objc_class_prefix = "DISCOVERYENGINE";
  25. option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
  26. option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
  27. // Document captures all raw metadata information of items to be recommended or
  28. // searched.
  29. message Document {
  30. option (google.api.resource) = {
  31. type: "discoveryengine.googleapis.com/Document"
  32. pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}"
  33. };
  34. // Data representation. One of
  35. // [struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data] or
  36. // [json_data][google.cloud.discoveryengine.v1beta.Document.json_data] should
  37. // be provided otherwise an INVALID_ARGUMENT error is thrown.
  38. oneof data {
  39. // The structured JSON data for the document. It should conform to the
  40. // registered [schema][] or an INVALID_ARGUMENT error is thrown.
  41. google.protobuf.Struct struct_data = 4;
  42. // The JSON string representation of the document. It should conform to the
  43. // registered [schema][] or an INVALID_ARGUMENT error is thrown.
  44. string json_data = 5;
  45. }
  46. // Immutable. The full resource name of the document.
  47. // Format:
  48. // `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
  49. //
  50. // This field must be a UTF-8 encoded string with a length limit of 1024
  51. // characters.
  52. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  53. // Immutable. The identifier of the document.
  54. //
  55. // Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
  56. // standard with a length limit of 63 characters.
  57. string id = 2 [(google.api.field_behavior) = IMMUTABLE];
  58. // Required. The identifier of the schema located in the same data store.
  59. string schema_id = 3 [(google.api.field_behavior) = REQUIRED];
  60. // The identifier of the parent document. Currently supports at most two level
  61. // document hierarchy.
  62. //
  63. // Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
  64. // standard with a length limit of 63 characters.
  65. string parent_document_id = 7;
  66. }