syntax = "proto3";

package global.nextgen.v1;

import "global/common/v1/resources.proto";
import "global/common/v1/service_plan.proto";
import "global/nextgen/v1/cluster.proto";
import "global/nextgen/v1/node_spec.proto";
import "global/nextgen/v1/resource_pool.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";

service RegionService {
  rpc GetRegionByLogicalName(GetRegionByLogicalNameRequest) returns (common.v1.Region) {}
  rpc GetRegionByClusterId(GetRegionByClusterIdRequest) returns (common.v1.Region) {}
  rpc ListRegions(ListRegionsRequest) returns (ListRegionsResponse) {}
  rpc ListCloudProviders(ListCloudProvidersRequest) returns (ListCloudProvidersResponse) {}
  rpc RegisterCloudProvider(RegisterCloudProviderRequest) returns (common.v1.CloudProvider) {}
  rpc RegisterRegion(RegisterRegionRequest) returns (common.v1.Region) {}
  rpc UpdateRegion(UpdateRegionRequest) returns (common.v1.Region) {}
  rpc DeleteRegion(DeleteRegionRequest) returns (google.protobuf.Empty) {}
  rpc SelectRegionByOrgId(SelectRegionByOrgIdRequest) returns (common.v1.Region) {}

  rpc UpdateRegionOpsAuditLogSetting(UpdateRegionOpsAuditLogSettingRequest) returns (UpdateRegionOpsAuditLogSettingResponse) {}

  rpc RegisterRegionProviderIdentity(RegisterRegionProviderIdentityRequest) returns (RegionProviderIdentity) {}
  rpc ListRegionProviderIdentities(ListRegionProviderIdentitiesRequest) returns (ListRegionProviderIdentitiesResponse) {}

  rpc ListRegionCapacities(ListRegionCapacitiesRequest) returns (ListRegionCapacitiesResponse) {}
  rpc ListByocVcpuPools(ListByocVcpuPoolsRequest) returns (ListByocVcpuPoolsResponse) {}
  rpc GetByocSharedComponentScaleConstraints(GetByocSharedComponentScaleConstraintsRequest) returns (ByocSharedComponentScaleConstraints) {}
  rpc ScaleByocSharedComponents(ScaleByocSharedComponentsRequest) returns (ScaleByocSharedComponentsResponse) {}
  rpc ListNodeSpecs(ListNodeSpecsRequest) returns (ListNodeSpecsResponse) {}
  rpc PlanResourcePoolCidr(PlanResourcePoolCidrRequest) returns (PlanResourcePoolCidrResponse) {}
  rpc ValidateResourcePoolCidr(ValidateResourcePoolCidrRequest) returns (ValidateResourcePoolCidrResponse) {}
}

message GetRegionByLogicalNameRequest {
  string region_logical_name = 1 [(google.api.field_behavior) = REQUIRED];
}

message ListRegionsRequest {
  common.v1.CloudProvider.Name cloud_provider_id = 1 [(google.api.field_behavior) = OPTIONAL];
  common.v1.ServicePlan service_plan = 2 [(google.api.field_behavior) = OPTIONAL];
  uint64 organization_id = 3 [(google.api.field_behavior) = OPTIONAL];
  common.v1.Region.State state = 4 [(google.api.field_behavior) = OPTIONAL];
}

message ListRegionsResponse {
  repeated common.v1.Region regions = 1;
}

message ListCloudProvidersRequest {
  common.v1.ServicePlan service_plan = 1 [(google.api.field_behavior) = OPTIONAL];
  uint64 organization_id = 2 [(google.api.field_behavior) = OPTIONAL];
  common.v1.CloudProvider.State state = 3 [(google.api.field_behavior) = OPTIONAL];
}

message ListCloudProvidersResponse {
  repeated common.v1.CloudProvider cloud_providers = 1;
}

message RegisterCloudProviderRequest {
  common.v1.CloudProvider cloud_provider = 1 [(google.api.field_behavior) = REQUIRED];
}

message RegisterRegionRequest {
  common.v1.Region region = 1 [(google.api.field_behavior) = REQUIRED];
  repeated RegionProviderIdentity region_provider_identities = 2 [(google.api.field_behavior) = REQUIRED];
}

message UpdateRegionRequest {
  common.v1.Region region = 1 [(google.api.field_behavior) = REQUIRED];
  repeated DefaultRegionProviderIdentity default_provider_identities = 2 [(google.api.field_behavior) = OPTIONAL];
}

message DeleteRegionRequest {
  common.v1.CloudProvider.Name cloud_provider_id = 1 [(google.api.field_behavior) = REQUIRED];
  string region_logical_name = 2 [(google.api.field_behavior) = REQUIRED];
  common.v1.ServicePlan service_plan = 3 [(google.api.field_behavior) = OPTIONAL];
}

message GetRegionByClusterIdRequest {
  uint64 cluster_id = 1 [(google.api.field_behavior) = REQUIRED];
}

message SelectRegionByOrgIdRequest {
  uint64 organization_id = 1 [(google.api.field_behavior) = REQUIRED];
  common.v1.CloudProvider.Name cloud_provider_id = 2 [(google.api.field_behavior) = REQUIRED];
  common.v1.Region.Name region_id = 3 [(google.api.field_behavior) = REQUIRED];
  common.v1.ServicePlan service_plan = 4 [(google.api.field_behavior) = OPTIONAL];
}

message UpdateRegionOpsAuditLogSettingRequest {
  RegionIdentifier region = 1 [(google.api.field_behavior) = REQUIRED];
  common.v1.RegionOpsAuditLogSetting ops_audit_log_setting = 3 [(google.api.field_behavior) = OPTIONAL];
}

message UpdateRegionOpsAuditLogSettingResponse {
  common.v1.Region region = 1;
}

message RegionIdentifier {
  oneof region_identifier {
    SelectRegionByOrgIdRequest org_region = 1;
    string region_logical_name = 2;
  }
}

message RegisterRegionProviderIdentityRequest {
  string region_logical_name = 1 [(google.api.field_behavior) = REQUIRED];
  RegionProviderIdentity region_provider_identity = 2 [(google.api.field_behavior) = REQUIRED];
}

message RegionProviderIdentity {
  uint64 id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  string identity = 3 [(google.api.field_behavior) = REQUIRED];

  bool is_default = 4 [(google.api.field_behavior) = OPTIONAL];
}

message ListRegionProviderIdentitiesRequest {
  string region_logical_name = 1 [(google.api.field_behavior) = REQUIRED];
}

message ListRegionProviderIdentitiesResponse {
  common.v1.Region region = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated RegionProviderIdentity region_provider_identities = 2;
  repeated DefaultRegionProviderIdentity default_provider_identities = 3;
}

message DefaultRegionProviderIdentity {
  uint64 id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint64 tenant_id = 2 [(google.api.field_behavior) = REQUIRED];
  string identity = 3 [(google.api.field_behavior) = REQUIRED];
  common.v1.ServicePlan service_plan = 4 [(google.api.field_behavior) = REQUIRED];
}

message ListRegionCapacitiesRequest {
  common.v1.CloudProvider.Name cloud_provider_id = 1 [(google.api.field_behavior) = OPTIONAL];
  common.v1.ServicePlan service_plan = 2 [(google.api.field_behavior) = REQUIRED];
  uint64 organization_id = 3 [(google.api.field_behavior) = REQUIRED];

  message UsageRequest {
    // Reserved for future use to specify the start of the time range
    google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OPTIONAL];
    // End time for the metrics query. The query will return historical data up to this timestamp.
    google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = REQUIRED];
  }

  UsageRequest usage = 4 [(google.api.field_behavior) = OPTIONAL];
}

message ListRegionCapacitiesResponse {
  repeated RegionCapacity capacities = 1;

  message RegionCapacity {
    common.v1.Region region = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
    int64 total_vcpus_limit = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
    int64 used_vcpus = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

    // Historical usage metrics over time
    repeated UsageMetrics history_usages = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  message UsageMetrics {
    google.protobuf.Timestamp metrics_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
    int64 used_vcpus = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  }
}

message ListByocVcpuPoolsRequest {
  common.v1.CloudProvider.Name cloud_provider_id = 1 [(google.api.field_behavior) = OPTIONAL];
  common.v1.Region.Name region_id = 2 [(google.api.field_behavior) = OPTIONAL];
  uint64 organization_id = 3 [(google.api.field_behavior) = REQUIRED];
}

message ListNodeSpecsRequest {
  uint64 organization_id = 1 [(google.api.field_behavior) = REQUIRED];
  common.v1.CloudProvider.Name cloud_provider_id = 2 [(google.api.field_behavior) = REQUIRED];
  common.v1.Region.Name region_id = 3 [(google.api.field_behavior) = REQUIRED];
  NodeSpecComponentType component_type = 4 [(google.api.field_behavior) = REQUIRED];
  int32 page_size = 100 [(google.api.field_behavior) = OPTIONAL];
  string page_token = 101 [(google.api.field_behavior) = OPTIONAL];
}

message ListNodeSpecsResponse {
  repeated ResourcePoolNodeSpec node_specs = 1;
  NodeCountOptions node_count_options = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  int32 total_size = 100;
  string next_page_token = 101;
}

message PlanResourcePoolCidrRequest {
  uint64 organization_id = 1 [(google.api.field_behavior) = REQUIRED];
  common.v1.CloudProvider.Name cloud_provider_id = 2 [(google.api.field_behavior) = REQUIRED];
  common.v1.Region.Name region_id = 3 [(google.api.field_behavior) = REQUIRED];
  ResourcePool.HighAvailabilityType high_availability_type = 4 [(google.api.field_behavior) = OPTIONAL];
}

message PlanResourcePoolCidrResponse {
  common.v1.CloudProvider.Name cloud_provider_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  common.v1.Region.Name region_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  ResourcePoolCidrPolicy policy = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ResourcePoolCidrExclusion exclusions = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  RecommendationStatus recommendation_status = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional ResourcePoolCidrRecommendation recommendation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

  enum RecommendationStatus {
    RECOMMENDATION_STATUS_UNSPECIFIED = 0;
    AVAILABLE = 1;
    EXHAUSTED = 2;
  }
}

message ValidateResourcePoolCidrRequest {
  uint64 organization_id = 1 [(google.api.field_behavior) = REQUIRED];
  common.v1.CloudProvider.Name cloud_provider_id = 2 [(google.api.field_behavior) = REQUIRED];
  common.v1.Region.Name region_id = 3 [(google.api.field_behavior) = REQUIRED];
  string cidr = 4 [(google.api.field_behavior) = REQUIRED];
  ResourcePool.HighAvailabilityType high_availability_type = 5 [(google.api.field_behavior) = OPTIONAL];
}

message ValidateResourcePoolCidrResponse {
  common.v1.CloudProvider.Name cloud_provider_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  common.v1.Region.Name region_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  string cidr = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional int64 supported_node_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ResourcePoolCidrValidationFinding blocking_findings = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ResourcePoolCidrPolicy {
  repeated string supported_private_cidrs = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ResourcePoolCidrPrefixRange allowed_prefix_ranges = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ResourcePoolCidrPrefixRange {
  int32 min_prefix_length = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  int32 max_prefix_length = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ResourcePoolCidrRecommendation {
  string cidr = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  int64 supported_node_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ResourcePoolCidrExclusion {
  Type type = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  string cidr = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional uint64 resource_pool_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional string resource_pool_display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional common.v1.Region.Name region_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional common.v1.CloudProvider.Name cloud_provider_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

  enum Type {
    TYPE_UNSPECIFIED = 0;
    RESOURCE_POOL = 1;
    O11Y_CLUSTER = 2;
    TIDB_CLOUD_RESERVED = 3;
  }
}

message ResourcePoolCidrValidationFinding {
  Code code = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional ResourcePoolCidrExclusion conflicting_exclusion = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  enum Code {
    CODE_UNSPECIFIED = 0;
    INVALID_CIDR = 1;
    CIDR_NOT_PRIVATE = 2;
    CIDR_PREFIX_UNSUPPORTED = 3;
    CIDR_OVERLAPS_RESOURCE_POOL = 4;
    CIDR_OVERLAPS_O11Y = 5;
    CIDR_OVERLAPS_RESERVED_NETWORK = 6;
  }
}

message ResourcePoolCidrValidationError {
  repeated ResourcePoolCidrValidationFinding blocking_findings = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message GetByocSharedComponentScaleConstraintsRequest {
  uint64 resource_pool_id = 1 [(google.api.field_behavior) = REQUIRED];
  uint64 organization_id = 2 [(google.api.field_behavior) = REQUIRED];
}

message ScaleByocSharedComponentsRequest {
  uint64 resource_pool_id = 1 [(google.api.field_behavior) = REQUIRED];
  uint64 organization_id = 2 [(google.api.field_behavior) = REQUIRED];
  optional ByocSharedComponentScaleTarget tikv = 3 [(google.api.field_behavior) = OPTIONAL];
  optional ByocSharedComponentScaleTarget tiflash_write = 4 [(google.api.field_behavior) = OPTIONAL];
  optional ByocSharedComponentScaleTarget tiflash_compute = 5 [(google.api.field_behavior) = OPTIONAL];
  bool validate_only = 100 [(google.api.field_behavior) = OPTIONAL];
}

message ListByocVcpuPoolsResponse {
  repeated Group groups = 1;

  enum PoolState {
    POOL_STATE_UNSPECIFIED = 0;
    AVAILABLE = 1;
    MODIFYING = 2;
  }

  message Group {
    common.v1.Region region = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
    int64 total_vcpus_limit = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
    repeated Pool pools = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  message Pool {
    uint64 resource_pool_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
    string name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
    // The control-plane recorded dataplane locator used by clients for O11Y discovery.
    // Its presence does not guarantee runtime discovery or metrics query success.
    string dataplane_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
    int64 vcpus_limit = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
    int64 vcpus_used = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
    // Whether this pool is the default BYOC pool for the current organization
    // under the same cloud provider and region.
    bool is_default = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
    // Availability scope of the underlying resource pool.
    ResourcePool.HighAvailabilityType high_availability_type = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
    // Runtime placement zones reported by dataplane-manager for the resource pool.
    ResourcePool.ZoneConfig zone_config = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
    PoolState state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
    repeated TidbInstance tidb_instances = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  message TidbInstance {
    uint64 cluster_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
    .global.nextgen.v1.Cluster.State base_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
    bool deleting = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  }
}

message ByocSharedComponentScaleConstraints {
  uint64 resource_pool_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint64 vcpus_limit = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  ByocSharedComponentScalePreviewSummary preview = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ByocSharedComponentScaleConstraint components = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ScaleByocSharedComponentsResponse {
  ByocSharedComponentScalePreviewSummary preview = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ByocSharedComponentScalePlanComponent components = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  string operation_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScalePreviewSummary {
  uint64 current_vcpus_used = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint64 scaling_vcpus_used = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint64 max_vcpus_limit = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  bool allowed = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated string blocking_reasons = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScaleConstraint {
  ByocSharedComponentType component_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  string component_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  bool exists = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  string phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  ByocSharedComponentScaleTarget current = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ByocSharedComponentScaleConstraintReason blocking_reasons = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  ByocSharedComponentScaleNodeCountConstraints node_count_constraints = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  ByocSharedComponentScaleNodeSpecConstraints node_spec_constraints = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScalePlanComponent {
  ByocSharedComponentType component_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  string component_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  ByocSharedComponentScaleTarget current = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  ByocSharedComponentScaleTarget target = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  bool allowed = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated string blocking_reasons = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScaleTarget {
  optional uint32 node_count = 1 [(google.api.field_behavior) = OPTIONAL];
  optional uint32 cpu = 2 [(google.api.field_behavior) = OPTIONAL];
  optional uint32 memory_gi = 3 [(google.api.field_behavior) = OPTIONAL];
  repeated ByocSharedComponentStorage storages = 4 [(google.api.field_behavior) = OPTIONAL];
}

message ByocSharedComponentStorage {
  string storage_name = 1 [(google.api.field_behavior) = REQUIRED];
  optional uint32 size_gi = 2 [(google.api.field_behavior) = OPTIONAL];
  optional uint32 iops = 3 [(google.api.field_behavior) = OPTIONAL];
  optional uint32 throughput_mbs = 4 [(google.api.field_behavior) = OPTIONAL];
}

message ByocSharedComponentScaleConstraintReason {
  string code = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScaleNodeCountConstraints {
  uint32 current = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint32 min = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint32 max = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  ByocSharedComponentScaleNodeCountRule rule = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  bool allow_cross_zero = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScaleNodeCountRule {
  string type = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint32 value = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScaleNodeSpecConstraints {
  string current = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ByocSharedComponentScaleNodeSpecCandidate candidates = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScaleNodeSpecCandidate {
  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint32 cpu = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint32 memory_gi = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  bool available = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  bool is_current = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ByocSharedComponentScaleConstraintReason reasons = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  ByocSharedComponentScaleRequiredMinSpec required_min_spec = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  repeated ByocSharedComponentScaleStorageConstraint storage_constraints = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScaleRequiredMinSpec {
  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint32 cpu = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint32 memory_gi = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message ByocSharedComponentScaleStorageConstraint {
  string storage_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  bool resizable = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  uint32 current_size_gi = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  optional uint32 max_size_gi = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}

enum ByocSharedComponentType {
  BYOC_SHARED_COMPONENT_TYPE_UNSPECIFIED = 0;
  BYOC_SHARED_COMPONENT_TYPE_TIKV = 1;
  BYOC_SHARED_COMPONENT_TYPE_TIFLASH_WRITE = 2;
  BYOC_SHARED_COMPONENT_TYPE_TIFLASH_COMPUTE = 3;
}
