/* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto3"; package cuttlefish.test_gce_driver; option java_multiple_files = true; option java_package = "com.android.cuttlefish.test"; option java_outer_classname = "TestGceDriverProtos"; message TestMessage { oneof contents { Exit exit = 1; StreamEnd stream_end = 2; Error error = 3; CreateInstance create_instance = 4; SshCommand ssh_command = 5; Data data = 6; UploadBuildArtifact upload_build_artifact = 7; UploadFile upload_file = 8; } } message Exit {} message StreamEnd {} message Error { string text = 1; } message GceInstanceId { string name = 1; string zone = 2; } message CreateInstance { GceInstanceId id = 1; } message SshCommand { GceInstanceId instance = 1; repeated string arguments = 2; } enum DataType { DATA_TYPE_UNSPECIFIED = 0; DATA_TYPE_STDOUT = 1; DATA_TYPE_STDERR = 2; DATA_TYPE_RETURN_CODE = 3; DATA_TYPE_FILE_CONTENTS = 4; } message Data { DataType type = 1; bytes contents = 2; } message Build { string id = 1; string target = 2; } message UploadBuildArtifact { GceInstanceId instance = 1; Build build = 2; string artifact_name = 3; string remote_path = 4; } message UploadFile { GceInstanceId instance = 1; string remote_path = 2; }