blob: 8f6918f891fc6fb790305c479d5f09d086e048c7 [file] [log] [blame]
// Copyright 2019 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
syntax = "proto3";
option go_package = "go.chromium.org/luci/gce/api/projects/v1;projects";
package projects;
import "google/protobuf/empty.proto";
import "go.chromium.org/luci/gce/api/projects/v1/config.proto";
// A request to delete a project.
message DeleteRequest {
// The id of the project to delete.
string id = 1;
}
// A request to create or update a project.
message EnsureRequest {
// The id of the project to ensure.
string id = 1;
// The project.
Config project = 2;
}
// A request to get an existing project.
message GetRequest {
// The id of the project to get.
string id = 1;
}
// A request to list existing projects.
message ListRequest {
// The value of next_page_token received in a ListResponse. Used to get the
// next page of projects. If empty, gets the first page.
string page_token = 1;
// The maximum number of results to include in the response.
int32 page_size = 2;
}
// A response to a request to list projects.
message ListResponse {
// The projects.
repeated Config projects = 1;
// The value to use as the page_token in a ListRequest to get the next page of
// projects. If empty, there are no more projects.
string next_page_token = 2;
}
// A service for manipulating projects.
service Projects {
// Delete deletes a project.
// Internal API.
rpc Delete(DeleteRequest) returns (google.protobuf.Empty);
// Ensure ensures a project exists.
// Creates a new project or updates an existing one as necessary.
// Internal API.
rpc Ensure(EnsureRequest) returns (Config);
// Get returns an existing project.
rpc Get(GetRequest) returns (Config);
// List returns existing projects.
rpc List(ListRequest) returns (ListResponse);
}