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 15syntax = "proto3"; 16 17package google.cloud.discoveryengine.v1beta; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/struct.proto"; 22 23option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; 24option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; 25option java_multiple_files = true; 26option java_outer_classname = "SchemaProto"; 27option java_package = "com.google.cloud.discoveryengine.v1beta"; 28option objc_class_prefix = "DISCOVERYENGINE"; 29option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; 30option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; 31 32// Defines the structure and layout of a type of document data. 33message Schema { 34 option (google.api.resource) = { 35 type: "discoveryengine.googleapis.com/Schema" 36 pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}" 37 pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}" 38 }; 39 40 // Schema representation. One of 41 // [struct_schema][google.cloud.discoveryengine.v1beta.Schema.struct_schema] 42 // or [json_schema][google.cloud.discoveryengine.v1beta.Schema.json_schema] 43 // should be provided otherwise an `INVALID_ARGUMENT` error is thrown. 44 oneof schema { 45 // The structured representation of the schema. 46 google.protobuf.Struct struct_schema = 2; 47 48 // The JSON representation of the schema. 49 string json_schema = 3; 50 } 51 52 // Immutable. The full resource name of the schema, in the format of 53 // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. 54 // 55 // This field must be a UTF-8 encoded string with a length limit of 1024 56 // characters. 57 string name = 1 [(google.api.field_behavior) = IMMUTABLE]; 58} 59