// Copyright 2022 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";

package chromiumos.test.api;

option go_package = "go.chromium.org/chromiumos/config/go/test/api";

import "google/protobuf/timestamp.proto";

// GceImage represents an existing GCE image.
message GceImage {
  // Name of GCP project. E.g. betty-cloud-prototype
  string project = 1;
  // Name of GCE image.
  string name = 2;
  // Readiness of GCE image.
  Status status = 3;
  // Status tracks the relevant status of VM lab use case: READY, PENDING,
  // FAILED, DELETING, NOT_FOUND. Unknown statuses are mapped to UNKNOWN.
  enum Status {
    UNKNOWN = 0;
    READY = 1;
    PENDING = 2;
    FAILED = 3;
    DELETING = 4;
    NOT_FOUND = 5;
  }
  // GCS URL of source image to be imported.
  string source = 4;
  // Labels of the image, including build-type, board, milestone.
  map<string, string> labels = 5;
  // Description of the image which contains source image in GS bucket.
  string description = 6;
  // Timestamp when the image is created in UTC.
  google.protobuf.Timestamp time_created = 7;
}
