// Copyright 2025 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
//
//     http://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 google.cloud.capacityplanner.v1beta;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.CapacityPlanner.V1Beta";
option go_package = "cloud.google.com/go/capacityplanner/apiv1beta/capacityplannerpb;capacityplannerpb";
option java_multiple_files = true;
option java_outer_classname = "LocationProto";
option java_package = "com.google.cloud.capacityplanner.v1beta";
option php_namespace = "Google\\Cloud\\CapacityPlanner\\V1beta";
option ruby_package = "Google::Cloud::CapacityPlanner::V1beta";

// The level of the Google Cloud Platform location.
enum LocationLevel {
  // Location level is unspecified.
  LOCATION_LEVEL_UNSPECIFIED = 0;

  // Cloud region.
  REGION = 1;

  // Cloud zone.
  ZONE = 2;

  // Globally.
  GLOBAL = 3;

  // A metro.
  METRO = 4;

  // Dual region pair.
  DUAL_REGION = 5;

  // Multiple regions.
  MULTI_REGION = 6;
}

// Identifier for a Google Cloud Platform location.
message LocationIdentifier {
  message LinkedLocation {
    // The location level such as a region.
    LocationLevel location_level = 1;

    // Required. The linked cloud location.
    string location = 2 [(google.api.field_behavior) = REQUIRED];

    string label = 3;
  }

  // The location level such as a region.
  LocationLevel location_level = 1;

  // Required. Location where resource is sourced. For Cloud Storage, the
  // alphabetically first location is the source.
  string source = 2 [(google.api.field_behavior) = REQUIRED];

  // Optional. Other linked locations.
  repeated LinkedLocation linked_locations = 3
      [(google.api.field_behavior) = OPTIONAL];
}
