/*
Copyright 2022 Google LLC

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

    https://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 sapagent.protos.instanceinfo;

option go_package = "github.com/GoogleCloudPlatform/sapagent/protos/instanceinfo";

message CloudProperties {
  string project_id = 1;
  string instance_id = 2;
  string zone = 3;
  string instance_name = 4;
  string image = 5;
  string numeric_project_id = 6;
  string region = 7;  // This is needed only for baremtal systems and is not
                      // used for GCE instances.
  string machine_type = 8;
  repeated string scopes = 9;
}

message Disk {
  // e.g. SCRATCH, PERSISTENT, etc.
  string type = 1;
  // last element of the disk source attribute, unique per project
  // only exists if this is a persistent disk
  string disk_name = 2;
  // human readable device name, does not necessarily match the disk_name
  string device_name = 3;
  // UNKNOWN, LOCAL_SSD, or PD_XXX
  string device_type = 4;
  bool is_local_ssd = 5;
  // local disk mapping for device_name
  // found by following the link to  /dev/disk/by-id/google-*
  string mapping = 6;
  // only applicable to extreme disk types
  int64 provisioned_iops = 7;
  // only applicable to extreme disk types
  int64 provisioned_throughput = 8;
}

message NetworkAdapter {
  string name = 1;
  string network_ip = 2;
  string network = 3;
  // local nic name mapping
  string mapping = 4;
}

message InstanceProperties {
  string machine_type = 1;
  string cpu_platform = 2;
  repeated Disk disks = 3;
  repeated NetworkAdapter network_adapters = 4;
  string creation_timestamp = 5;
  string last_migration_end_timestamp = 6;
}
