syntax = "proto3";

package global.nextgen.v1;

import "google/api/field_behavior.proto";

message ResourcePoolNodeSpec {
  string node_spec_key = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  NodeSpecComponentType component_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 cpu = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 memory_gi = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  bool is_default = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated NodeSpecStorage storages = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message NodeSpecStorage {
  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 default_size_gi = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 min_size_gi = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 max_size_gi = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional bool resizable = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional int64 current_size_gi = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message NodeCountOptions {
  int64 default_node_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 min_node_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 max_node_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  NodeCountRule rule = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message NodeCountRule {
  NodeCountRuleType type = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 value = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

enum NodeSpecComponentType {
  NODE_SPEC_COMPONENT_TYPE_UNSPECIFIED = 0;
  NODE_SPEC_COMPONENT_TYPE_TIKV = 1;
  NODE_SPEC_COMPONENT_TYPE_TIFLASH = 2;
}

enum NodeCountRuleType {
  NODE_COUNT_RULE_TYPE_UNSPECIFIED = 0;
  NODE_COUNT_RULE_TYPE_NONE = 1;
  NODE_COUNT_RULE_TYPE_MULTIPLE_OF = 2;
  NODE_COUNT_RULE_TYPE_FIXED = 3;
}
