1/* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16syntax = "proto3"; 17 18package tradefed.feature.server; 19 20option java_package = "com.proto.tradefed.feature"; 21option java_outer_classname = "TradefederationService"; 22 23option java_multiple_files = true; 24option java_generic_services = true; 25 26// A service associated with a Tradefed Instance that allows triggering some features. 27service TradefedInformation { 28 29 rpc triggerFeature(FeatureRequest) returns (FeatureResponse) {} 30} 31 32// A generic request to trigger a feature 33message FeatureRequest { 34 string name = 1; 35 36 map<string, string> args = 2; 37 38 string reference_id = 3; 39} 40 41// A generic response containing the output of the response or an error 42message FeatureResponse { 43 oneof response_oneof { 44 // A simple response 45 string response = 1; 46 47 // A more complex response due to the request needing multiple parts. 48 MultiPartResponse multi_part_response = 2; 49 } 50 51 // Field containing potential errors from the request. 52 ErrorInfo errorInfo = 3; 53} 54 55message MultiPartResponse { 56 repeated PartResponse response_part = 1; 57} 58 59message PartResponse { 60 string key = 1; 61 62 string value = 2; 63} 64 65message ErrorInfo { 66 // An error trace. 67 string error_trace = 1; 68} 69