syntax = "proto3";

package yandex.cloud.compute.v1;

import "google/protobuf/timestamp.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/compute/v1;compute";
option java_package = "yandex.cloud.api.compute.v1";

// A Snapshot resource. For more information, see [Snapshots](/docs/compute/concepts/snapshot).
message Snapshot {

  enum Status {
    STATUS_UNSPECIFIED = 0;

    // Snapshot is being created.
    CREATING = 1;

    // Snapshot is ready to use.
    READY = 2;

    // Snapshot encountered a problem and cannot operate.
    ERROR = 3;

    // Snapshot is being deleted.
    DELETING = 4;
  }

  // ID of the snapshot.
  string id = 1;

  // ID of the folder that the snapshot belongs to.
  string folder_id = 2;

  google.protobuf.Timestamp created_at = 3;

  // Name of the snapshot. 1-63 characters long.
  string name = 4;

  // Description of the snapshot. 0-256 characters long.
  string description = 5;

  // Resource labels as `key:value` pairs. Maximum of 64 per resource.
  map<string, string> labels = 6;

  // Size of the snapshot, specified in bytes.
  int64 storage_size = 7; // delta from prev snapshot from same disk

  // Size of the disk when the snapshot was created, specified in bytes.
  int64 disk_size = 8;  // at snapshot moment

  // License IDs that indicate which licenses are attached to this resource.
  // License IDs are used to calculate additional charges for the use of the virtual machine.
  //
  // The correct license ID is generated by Yandex.Cloud. IDs are inherited by new resources created from this resource.
  //
  // If you know the license IDs, specify them when you create the image.
  // For example, if you create a disk image using a third-party utility and load it into Yandex Object Storage, the license IDs will be lost.
  // You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
  repeated string product_ids = 9;

  // Current status of the snapshot.
  Status status = 10;

  // ID of the source disk used to create this snapshot.
  string source_disk_id = 11;
}
