// Copyright 2023 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.

// Generated by the C++ microgenerator.
// If you make any local changes, they will be lost.
// file:///workspace/generator/discovery/compute_public_google_rest_v1.json
// revision: 20231110

syntax = "proto3";

package google.cloud.cpp.compute.v1;

// The share setting for reservations and sole tenancy node groups.
message ShareSettings {
  // A map of project id and project config. This is only valid when
  // share_type's value is SPECIFIC_PROJECTS.
  map<string, ShareSettingsProjectConfig> project_map = 1
      [json_name = "projectMap"];

  // Type of sharing for this shared-reservation
  // LOCAL: Default value.
  // ORGANIZATION: Shared-reservation is open to entire Organization
  // SHARE_TYPE_UNSPECIFIED: Default value. This value is unused.
  // SPECIFIC_PROJECTS: Shared-reservation is open to specific projects
  optional string share_type = 2 [json_name = "shareType"];
}

// Config for each project in the share settings.
message ShareSettingsProjectConfig {
  // The project ID, should be same as the key of this project config in the
  // parent map.
  optional string project_id = 1 [json_name = "projectId"];
}
