xref: /aosp_15_r20/external/google-cloud-java/owl-bot-postprocessor/synthtool/protos/metadata.proto (revision 55e87721aa1bc457b326496a7ca40f3ea1a63287)
1// Copyright 2018 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//    https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package yoshi.synth.metadata;
18
19import "google/protobuf/timestamp.proto";
20
21
22message Metadata {
23    google.protobuf.Timestamp update_time = 1 [deprecated=true];
24
25    repeated Source sources = 2;
26    repeated Destination destinations = 3;
27    repeated NewFile new_files = 4 [deprecated=true];
28    repeated string generated_files = 5;
29}
30
31message Source {
32    oneof source {
33        GitSource git = 1;
34        GeneratorSource generator = 2;
35        TemplateSource template = 3;
36    }
37}
38
39message GitSource {
40    string name = 1;
41    string remote = 2;
42    string sha = 3;
43
44    // If this Git is a mirror of an internal repository, such as google3 or
45    // Git-on-Borg, you can include an internal ref to it here.
46    string internal_ref = 4;
47
48    // When the git repo has been cloned locally, record its path.
49    string local_path = 5;
50
51    // Changes since the last generation.
52    string log = 6;
53}
54
55message GeneratorSource {
56    string name = 1;
57    string version = 2;
58    string docker_image = 3;
59}
60
61message TemplateSource {
62    string name = 1;
63    string origin = 2;
64    string version = 3;
65}
66
67message Destination {
68    oneof Destination {
69        ClientDestination client = 1;
70        FileSetDestination fileset = 2;
71    }
72}
73
74message NewFile {
75    string path = 1;
76}
77
78message ClientDestination {
79    string source = 1;
80    string api_name = 2;
81    string api_version = 3;
82    string language = 4;
83    string generator = 5;
84    string config = 6;
85}
86
87// Currently unused as storing all file destination options will likely cause
88// the metadata file to be too large and may cause autosynth trashing. We'll
89// investigate using this in the future.
90message FileSetDestination {
91    string source = 1;
92    repeated string files = 2;
93}
94