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