go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/gce/api/config/v1/service.proto (about) 1 // Copyright 2018 The LUCI Authors. All rights reserved. 2 // Use of this source code is governed under the Apache License, Version 2.0 3 // that can be found in the LICENSE file. 4 5 syntax = "proto3"; 6 7 option go_package = "go.chromium.org/luci/gce/api/config/v1;config"; 8 9 package config; 10 11 import "google/protobuf/empty.proto"; 12 import "google/protobuf/field_mask.proto"; 13 import "go.chromium.org/luci/gce/api/config/v1/config.proto"; 14 15 // A request to delete a config. 16 message DeleteRequest { 17 // The id of the config to delete. 18 string id = 1; 19 } 20 21 // A request to create or update a config. 22 message EnsureRequest { 23 // The id of the config to ensure. 24 string id = 1; 25 26 // The config. 27 Config config = 2; 28 } 29 30 // A request to get an existing config. 31 message GetRequest { 32 // The id of the config to get. 33 string id = 1; 34 } 35 36 // A request to list existing configs. 37 message ListRequest { 38 // The value of next_page_token received in a ListResponse. Used to get the 39 // next page of configs. If empty, gets the first page. 40 string page_token = 1; 41 42 // The maximum number of results to include in the response. 43 int32 page_size = 2; 44 } 45 46 // A response to a request to list configs. 47 message ListResponse { 48 // The configs. 49 repeated Config configs = 1; 50 51 // The value to use as the page_token in a ListRequest to get the next page of 52 // configs. If empty, there are no more configs. 53 string next_page_token = 2; 54 } 55 56 // A request to update an existing config. 57 message UpdateRequest { 58 // The id of the config to update. 59 string id = 1; 60 61 // The config. 62 Config config = 2; 63 64 // The fields to update. Only config.current_amount and config.duts may be updated. 65 google.protobuf.FieldMask update_mask = 3; 66 } 67 68 // A service for manipulating configs. 69 service Configuration { 70 // Delete deletes a config. 71 // Internal API. 72 rpc Delete(DeleteRequest) returns (google.protobuf.Empty); 73 // Ensure ensures a config exists. 74 // Creates a new config or updates an existing one as necessary. 75 // Internal API. 76 rpc Ensure(EnsureRequest) returns (Config); 77 // Get returns an existing config. 78 rpc Get(GetRequest) returns (Config); 79 // List returns existing configs. 80 rpc List(ListRequest) returns (ListResponse); 81 // Update updates a config. 82 rpc Update(UpdateRequest) returns (Config); 83 }