-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsingleton.proto
More file actions
75 lines (64 loc) · 2.11 KB
/
singleton.proto
File metadata and controls
75 lines (64 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Copyright 2020 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.
syntax = "proto3";
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/resource.proto";
import "google/protobuf/field_mask.proto";
service Library {
// Get the configuration for a author.
rpc GetConfig(GetConfigRequest) returns (Config) {
option (google.api.http) = {
get: "/v1/{name=authors/*/config}"
};
option (google.api.method_signature) = "name";
}
// Update the configuration for a author.
rpc UpdateConfig(UpdateConfigRequest) returns (Config) {
option (google.api.http) = {
patch: "/v1/{config.name=authors/*/config}"
body: "config"
};
option (google.api.method_signature) = "config,update_mask";
}
}
// Request message to get a author's config.
message GetConfigRequest {
// The name of the config.
// Format: authors/{author}/config
string name = 1 [(google.api.resource_reference) = {
type: "library.googleapis.com/Config"
}];
}
// Request message to update a author's config.
message UpdateConfigRequest {
// The new config object.
Config config = 1;
// The list of fields to be updated.
google.protobuf.FieldMask update_mask = 2;
}
// The configuration options for a author.
message Config {
option (google.api.resource) = {
type: "library.googleapis.com/Config"
pattern: "authors/{author}/config"
};
// The name of the config.
// Format: authors/{author}/config
string name = 1;
// The author's preferred language.
string language_code = 2;
// The time zone where the author resides.
string time_zone = 3;
}