// 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.image_family_views.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/cloud/compute/v1/internal/common_054.proto";

// Service for the imageFamilyViews resource.
// https://cloud.google.com/compute/docs/reference/rest/v1/imageFamilyViews
service ImageFamilyViews {
  option (google.api.default_host) = "compute.googleapis.com";
  option (google.api.oauth_scopes) =
      "https://www.googleapis.com/auth/cloud-platform,"
      "https://www.googleapis.com/auth/compute,"
      "https://www.googleapis.com/auth/compute.readonly";

  // Returns the latest image that is part of an image family, is not deprecated
  // and is rolled out in the specified zone.
  // https://cloud.google.com/compute/docs/reference/rest/v1/imageFamilyViews/get
  rpc GetImageFamilyView(GetImageFamilyViewRequest)
      returns (google.cloud.cpp.compute.v1.ImageFamilyView) {
    option (google.api.http) = {
      get: "/compute/v1/projects/{project}/zones/{zone}/imageFamilyViews/{family}"
    };
    option (google.api.method_signature) = "project,zone,family";
  }
}

// Request message for GetImageFamilyView.
message GetImageFamilyViewRequest {
  // Name of the image family to search for.
  string family = 1
      [(google.api.field_behavior) = REQUIRED, json_name = "family"];

  // Project ID for this request.
  string project = 2
      [(google.api.field_behavior) = REQUIRED, json_name = "project"];

  // The name of the zone for this request.
  string zone = 3 [(google.api.field_behavior) = REQUIRED, json_name = "zone"];
}
