-
Notifications
You must be signed in to change notification settings - Fork 0
/
organization.proto
92 lines (83 loc) · 3.36 KB
/
organization.proto
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Copyright 2023-2024 Buf Technologies, Inc.
//
// 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
//
// http://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";
package buf.registry.owner.v1;
import "buf/registry/priv/extension/v1beta1/extension.proto";
import "buf/validate/validate.proto";
import "google/protobuf/timestamp.proto";
option go_package = "buf.build/gen/go/bufbuild/registry/protocolbuffers/go/buf/registry/owner/v1";
// Organization is an organization on the BSR.
//
// A name uniquely identifies an Organization, however name is mutable.
message Organization {
option (buf.registry.priv.extension.v1beta1.message).response_only = true;
// The id for the Organization.
string id = 1 [
(buf.validate.field).required = true,
(buf.validate.field).string.tuuid = true
];
// The time the Organization was created.
google.protobuf.Timestamp create_time = 2 [(buf.validate.field).required = true];
// The last time the Organization was updated.
google.protobuf.Timestamp update_time = 3 [(buf.validate.field).required = true];
// The name of the Organization.
//
// A name uniquely identifies an Organization, however name is mutable.
string name = 4 [
(buf.validate.field).required = true,
(buf.validate.field).string.min_len = 2,
(buf.validate.field).string.max_len = 32,
(buf.validate.field).string.pattern = "^[a-z][a-z0-9-]*[a-z0-9]$"
];
// The configurable description of the Organization.
string description = 5 [(buf.validate.field).string.max_len = 350];
// The configurable URL that represents the homepage for an Organization.
string url = 6 [
(buf.validate.field).string.uri = true,
(buf.validate.field).string.max_len = 255,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
// The verification status of the Organization.
OrganizationVerificationStatus verification_status = 7 [
(buf.validate.field).required = true,
(buf.validate.field).enum.defined_only = true
];
}
// The verification status of an Organization.
enum OrganizationVerificationStatus {
ORGANIZATION_VERIFICATION_STATUS_UNSPECIFIED = 0;
// The Organization is unverified.
ORGANIZATION_VERIFICATION_STATUS_UNVERIFIED = 1;
// The Organization is verified.
ORGANIZATION_VERIFICATION_STATUS_VERIFIED = 2;
// The Organization is an official organization of the BSR owner.
ORGANIZATION_VERIFICATION_STATUS_OFFICIAL = 3;
}
// OrganizationRef is a reference to an Organization, either an id or a name.
//
// This is used in requests.
message OrganizationRef {
option (buf.registry.priv.extension.v1beta1.message).request_only = true;
oneof value {
option (buf.validate.oneof).required = true;
// The id of the Organization.
string id = 1 [(buf.validate.field).string.tuuid = true];
// The name of the Organization.
string name = 2 [(buf.validate.field).string = {
min_len: 2
max_len: 32
pattern: "^[a-z][a-z0-9-]*[a-z0-9]$"
}];
}
}