1// Copyright 2023 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.contentwarehouse.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/cloud/contentwarehouse/v1/synonymset.proto"; 22 23option csharp_namespace = "Google.Cloud.ContentWarehouse.V1"; 24option go_package = "cloud.google.com/go/contentwarehouse/apiv1/contentwarehousepb;contentwarehousepb"; 25option java_multiple_files = true; 26option java_outer_classname = "SynonymSetServiceRequestProto"; 27option java_package = "com.google.cloud.contentwarehouse.v1"; 28option php_namespace = "Google\\Cloud\\ContentWarehouse\\V1"; 29option ruby_package = "Google::Cloud::ContentWarehouse::V1"; 30 31// Request message for SynonymSetService.CreateSynonymSet. 32message CreateSynonymSetRequest { 33 // Required. The parent name. 34 // Format: projects/{project_number}/locations/{location}. 35 string parent = 1 [ 36 (google.api.field_behavior) = REQUIRED, 37 (google.api.resource_reference) = { 38 type: "contentwarehouse.googleapis.com/Location" 39 } 40 ]; 41 42 // Required. The synonymSet to be created for a context 43 SynonymSet synonym_set = 2 [(google.api.field_behavior) = REQUIRED]; 44} 45 46// Request message for SynonymSetService.GetSynonymSet. 47// Will return synonymSet for a certain context. 48message GetSynonymSetRequest { 49 // Required. The name of the synonymSet to retrieve 50 // Format: 51 // projects/{project_number}/locations/{location}/synonymSets/{context}. 52 string name = 1 [ 53 (google.api.field_behavior) = REQUIRED, 54 (google.api.resource_reference) = { 55 type: "contentwarehouse.googleapis.com/SynonymSet" 56 } 57 ]; 58} 59 60// Request message for SynonymSetService.ListSynonymSets. 61// Will return all synonymSets belonging to the customer project. 62message ListSynonymSetsRequest { 63 // Required. The parent name. 64 // Format: projects/{project_number}/locations/{location}. 65 string parent = 1 [ 66 (google.api.field_behavior) = REQUIRED, 67 (google.api.resource_reference) = { 68 type: "contentwarehouse.googleapis.com/Location" 69 } 70 ]; 71 72 // The maximum number of synonymSets to return. The service may return 73 // fewer than this value. 74 // If unspecified, at most 50 rule sets will be returned. 75 // The maximum value is 1000; values above 1000 will be coerced to 1000. 76 int32 page_size = 2; 77 78 // A page token, received from a previous `ListSynonymSets` call. 79 // Provide this to retrieve the subsequent page. 80 // 81 // When paginating, all other parameters provided to `ListSynonymSets` 82 // must match the call that provided the page token. 83 string page_token = 3; 84} 85 86// Response message for SynonymSetService.ListSynonymSets. 87message ListSynonymSetsResponse { 88 // The synonymSets from the specified parent. 89 repeated SynonymSet synonym_sets = 1; 90 91 // A page token, received from a previous `ListSynonymSets` call. 92 // Provide this to retrieve the subsequent page. 93 string next_page_token = 2; 94} 95 96// Request message for SynonymSetService.UpdateSynonymSet. 97// Removes the SynonymSet for the specified context and replaces 98// it with the SynonymSet in this request. 99message UpdateSynonymSetRequest { 100 // Required. The name of the synonymSet to update 101 // Format: 102 // projects/{project_number}/locations/{location}/synonymSets/{context}. 103 string name = 1 [ 104 (google.api.field_behavior) = REQUIRED, 105 (google.api.resource_reference) = { 106 type: "contentwarehouse.googleapis.com/SynonymSet" 107 } 108 ]; 109 110 // Required. The synonymSet to be updated for the customer 111 SynonymSet synonym_set = 2 [(google.api.field_behavior) = REQUIRED]; 112} 113 114// Request message for SynonymSetService.DeleteSynonymSet. 115message DeleteSynonymSetRequest { 116 // Required. The name of the synonymSet to delete 117 // Format: 118 // projects/{project_number}/locations/{location}/synonymSets/{context}. 119 string name = 1 [ 120 (google.api.field_behavior) = REQUIRED, 121 (google.api.resource_reference) = { 122 type: "contentwarehouse.googleapis.com/SynonymSet" 123 } 124 ]; 125} 126