1// Copyright 2016 The Android Open Source Project
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 = "proto2";
16
17package acloud.internal.proto;
18
19// Hold configurations from user.
20message UserConfig {
21  // Account information for accessing Cloud API
22  optional string service_account_name = 1;
23  optional string service_account_private_key_path = 2;
24
25  // Compute Engine project name
26  optional string project = 3;
27  // Compute Engine zone name, e.g. "us-central1-f"
28  optional string zone = 4;
29  optional string machine_type = 5;
30  // Compute Engine network name, e.g. "default"
31  optional string network = 6;
32
33  // SSH key configuration
34  optional string ssh_private_key_path = 7;
35  optional string ssh_public_key_path = 8;
36
37  // Storage configuration
38  optional string storage_bucket_name = 9;
39
40  // Desired orientation, e.g. 'portrait' or 'landscape'
41  optional string orientation = 10;
42  // Desired resolution
43  optional string resolution = 11;
44  // Size of extra data disk.
45  optional int32 extra_data_disk_size_gb = 12;
46  // Metadata for creating Compute Engine instance
47  map <string, string>  metadata_variable = 13;
48
49  // client_id and client secret are required when user authenticates via
50  // Oauth2 flow with their user account (not service account).
51  //   * They are created in the cloud project console -> API manager.
52  //   * They are used to authorize the app to talk to the cloud project
53  //     on behalf of the user.
54  //   * They by themselves do not authenticate the user.
55  //   * They are stored as plain text in the configuration file so they are
56  //     not that secret. Generally, we should not share it with people we
57  //     don't trust.
58  //   * All users talking to the same cloud project can share the same
59  //     client_id and client_secret.
60  optional string client_id = 14;
61  optional string client_secret = 15;
62
63  // [CVD only] The name of the stable host image released by Cloud Android team
64  optional string stable_host_image_name = 16;
65  // [CVD only] The project that the stable host image is released to
66  optional string stable_host_image_project = 17;
67
68  // [GOLDFISH only] The name of the stable host image released by Android
69  // Emulator (emu-dev) team
70  optional string stable_goldfish_host_image_name = 18;
71  // [GOLDFISH only] The project that the stable goldfish host image is
72  // released to (emu-dev-cts)
73
74  optional string stable_goldfish_host_image_project = 19;
75
76  // Account information for accessing Cloud API
77  // This is the new way to provide service account auth.
78  optional string service_account_json_private_key_path = 20;
79
80  // Desired hw_property
81  optional string hw_property = 21;
82
83  // [CHEEPS only] The name of the stable host image released by the ARC
84  // (arc-eng) team
85  optional string stable_cheeps_host_image_name = 22;
86  // [CHEEPS only] The project that the stable host image is released to
87  optional string stable_cheeps_host_image_project = 23;
88
89  // [CVD only] It will get passed into the launch_cvd command if not empty.
90  // In version 0.7.2 and later.
91  optional string launch_args = 24;
92
93  // The pattern of the instance name, e.g. ins-{uuid}-{build_id}-{build_target}
94  // the parts in {} will be automatically replaced with the actual value if
95  // you specify them in the pattern, uuid will be automatically generated.
96  optional string instance_name_pattern = 25;
97
98  // List of scopes that will be given to the instance
99  // https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#changeserviceaccountandscopes
100  repeated string extra_scopes = 26;
101
102  // Provide some additional parameters to build the ssh tunnel.
103  optional string extra_args_ssh_tunnel = 27;
104
105  // [CVD only] Version of fetch_cvd to use.
106  optional string fetch_cvd_version = 28;
107
108  // [CVD only] Enable multi stage function.
109  optional bool enable_multi_stage = 29;
110}
111