blob: af057b90be5e57c68f3cac089463876b7222269a [file] [log] [blame]
William Kurkianea869482019-04-09 15:16:11 -04001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/api/resource.proto
3
Abhilash S.L3b494632019-07-16 15:51:09 +05304package annotations
William Kurkianea869482019-04-09 15:16:11 -04005
Abhilash S.L3b494632019-07-16 15:51:09 +05306import (
7 fmt "fmt"
8 math "math"
9
10 proto "github.com/golang/protobuf/proto"
11 descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
12)
William Kurkianea869482019-04-09 15:16:11 -040013
14// Reference imports to suppress errors if they are not otherwise used.
15var _ = proto.Marshal
16var _ = fmt.Errorf
17var _ = math.Inf
18
19// This is a compile-time assertion to ensure that this generated file
20// is compatible with the proto package it is being compiled against.
21// A compilation error at this line likely means your copy of the
22// proto package needs to be updated.
Abhilash S.L3b494632019-07-16 15:51:09 +053023const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
William Kurkianea869482019-04-09 15:16:11 -040024
Abhilash S.L3b494632019-07-16 15:51:09 +053025// A description of the historical or future-looking state of the
26// resource pattern.
27type ResourceDescriptor_History int32
28
29const (
30 // The "unset" value.
31 ResourceDescriptor_HISTORY_UNSPECIFIED ResourceDescriptor_History = 0
32 // The resource originally had one pattern and launched as such, and
33 // additional patterns were added later.
34 ResourceDescriptor_ORIGINALLY_SINGLE_PATTERN ResourceDescriptor_History = 1
35 // The resource has one pattern, but the API owner expects to add more
36 // later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
37 // that from being necessary once there are multiple patterns.)
38 ResourceDescriptor_FUTURE_MULTI_PATTERN ResourceDescriptor_History = 2
39)
40
41var ResourceDescriptor_History_name = map[int32]string{
42 0: "HISTORY_UNSPECIFIED",
43 1: "ORIGINALLY_SINGLE_PATTERN",
44 2: "FUTURE_MULTI_PATTERN",
45}
46
47var ResourceDescriptor_History_value = map[string]int32{
48 "HISTORY_UNSPECIFIED": 0,
49 "ORIGINALLY_SINGLE_PATTERN": 1,
50 "FUTURE_MULTI_PATTERN": 2,
51}
52
53func (x ResourceDescriptor_History) String() string {
54 return proto.EnumName(ResourceDescriptor_History_name, int32(x))
55}
56
57func (ResourceDescriptor_History) EnumDescriptor() ([]byte, []int) {
58 return fileDescriptor_465e9122405d1bb5, []int{0, 0}
59}
60
61// A simple descriptor of a resource type.
62//
63// ResourceDescriptor annotates a resource message (either by means of a
64// protobuf annotation or use in the service config), and associates the
65// resource's schema, the resource type, and the pattern of the resource name.
William Kurkianea869482019-04-09 15:16:11 -040066//
67// Example:
68//
Abhilash S.L3b494632019-07-16 15:51:09 +053069// message Topic {
70// // Indicates this message defines a resource schema.
71// // Declares the resource type in the format of {service}/{kind}.
72// // For Kubernetes resources, the format is {api group}/{kind}.
73// option (google.api.resource) = {
74// type: "pubsub.googleapis.com/Topic"
75// pattern: "projects/{project}/topics/{topic}"
76// };
77// }
78//
79// Sometimes, resources have multiple patterns, typically because they can
80// live under multiple parents.
81//
82// Example:
83//
84// message LogEntry {
85// option (google.api.resource) = {
86// type: "logging.googleapis.com/LogEntry"
87// pattern: "projects/{project}/logs/{log}"
88// pattern: "organizations/{organization}/logs/{log}"
89// pattern: "folders/{folder}/logs/{log}"
90// pattern: "billingAccounts/{billing_account}/logs/{log}"
91// };
92// }
93type ResourceDescriptor struct {
94 // The resource type. It must be in the format of
95 // {service_name}/{resource_type_kind}. The `resource_type_kind` must be
96 // singular and must not include version numbers.
97 //
98 // Example: `storage.googleapis.com/Bucket`
99 //
100 // The value of the resource_type_kind must follow the regular expression
101 // /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
102 // should use PascalCase (UpperCamelCase). The maximum number of
103 // characters allowed for the `resource_type_kind` is 100.
104 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
105 // Optional. The valid resource name pattern(s) for this resource type.
William Kurkianea869482019-04-09 15:16:11 -0400106 //
107 // Examples:
108 // - "projects/{project}/topics/{topic}"
109 // - "projects/{project}/knowledgeBases/{knowledge_base}"
William Kurkianea869482019-04-09 15:16:11 -0400110 //
Abhilash S.L3b494632019-07-16 15:51:09 +0530111 // The components in braces correspond to the IDs for each resource in the
112 // hierarchy. It is expected that, if multiple patterns are provided,
113 // the same component name (e.g. "project") refers to IDs of the same
114 // type of resource.
115 Pattern []string `protobuf:"bytes,2,rep,name=pattern,proto3" json:"pattern,omitempty"`
116 // Optional. The field on the resource that designates the resource name
117 // field. If omitted, this is assumed to be "name".
118 NameField string `protobuf:"bytes,3,opt,name=name_field,json=nameField,proto3" json:"name_field,omitempty"`
119 // Optional. The historical or future-looking state of the resource pattern.
William Kurkianea869482019-04-09 15:16:11 -0400120 //
121 // Example:
Abhilash S.L3b494632019-07-16 15:51:09 +0530122 // // The InspectTemplate message originally only supported resource
123 // // names with organization, and project was added later.
124 // message InspectTemplate {
125 // option (google.api.resource) = {
126 // type: "dlp.googleapis.com/InspectTemplate"
127 // pattern:
128 // "organizations/{organization}/inspectTemplates/{inspect_template}"
129 // pattern: "projects/{project}/inspectTemplates/{inspect_template}"
130 // history: ORIGINALLY_SINGLE_PATTERN
131 // };
132 // }
133 History ResourceDescriptor_History `protobuf:"varint,4,opt,name=history,proto3,enum=google.api.ResourceDescriptor_History" json:"history,omitempty"`
134 XXX_NoUnkeyedLiteral struct{} `json:"-"`
135 XXX_unrecognized []byte `json:"-"`
136 XXX_sizecache int32 `json:"-"`
137}
138
139func (m *ResourceDescriptor) Reset() { *m = ResourceDescriptor{} }
140func (m *ResourceDescriptor) String() string { return proto.CompactTextString(m) }
141func (*ResourceDescriptor) ProtoMessage() {}
142func (*ResourceDescriptor) Descriptor() ([]byte, []int) {
143 return fileDescriptor_465e9122405d1bb5, []int{0}
144}
145
146func (m *ResourceDescriptor) XXX_Unmarshal(b []byte) error {
147 return xxx_messageInfo_ResourceDescriptor.Unmarshal(m, b)
148}
149func (m *ResourceDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
150 return xxx_messageInfo_ResourceDescriptor.Marshal(b, m, deterministic)
151}
152func (m *ResourceDescriptor) XXX_Merge(src proto.Message) {
153 xxx_messageInfo_ResourceDescriptor.Merge(m, src)
154}
155func (m *ResourceDescriptor) XXX_Size() int {
156 return xxx_messageInfo_ResourceDescriptor.Size(m)
157}
158func (m *ResourceDescriptor) XXX_DiscardUnknown() {
159 xxx_messageInfo_ResourceDescriptor.DiscardUnknown(m)
160}
161
162var xxx_messageInfo_ResourceDescriptor proto.InternalMessageInfo
163
164func (m *ResourceDescriptor) GetType() string {
165 if m != nil {
166 return m.Type
167 }
168 return ""
169}
170
171func (m *ResourceDescriptor) GetPattern() []string {
172 if m != nil {
173 return m.Pattern
174 }
175 return nil
176}
177
178func (m *ResourceDescriptor) GetNameField() string {
179 if m != nil {
180 return m.NameField
181 }
182 return ""
183}
184
185func (m *ResourceDescriptor) GetHistory() ResourceDescriptor_History {
186 if m != nil {
187 return m.History
188 }
189 return ResourceDescriptor_HISTORY_UNSPECIFIED
190}
191
192// Defines a proto annotation that describes a field that refers to a resource.
193type ResourceReference struct {
194 // The resource type that the annotated field references.
195 //
196 // Example:
197 //
198 // message Subscription {
199 // string topic = 2 [(google.api.resource_reference) = {
200 // type = "pubsub.googleapis.com/Topic"
201 // }];
202 // }
203 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
204 // The resource type of a child collection that the annotated field
205 // references. This is useful for `parent` fields where a resource has more
206 // than one possible type of parent.
207 //
208 // Example:
209 //
210 // message ListLogEntriesRequest {
211 // string parent = 1 [(google.api.resource_reference) = {
212 // child_type: "logging.googleapis.com/LogEntry"
213 // };
214 // }
215 ChildType string `protobuf:"bytes,2,opt,name=child_type,json=childType,proto3" json:"child_type,omitempty"`
William Kurkianea869482019-04-09 15:16:11 -0400216 XXX_NoUnkeyedLiteral struct{} `json:"-"`
217 XXX_unrecognized []byte `json:"-"`
218 XXX_sizecache int32 `json:"-"`
219}
220
Abhilash S.L3b494632019-07-16 15:51:09 +0530221func (m *ResourceReference) Reset() { *m = ResourceReference{} }
222func (m *ResourceReference) String() string { return proto.CompactTextString(m) }
223func (*ResourceReference) ProtoMessage() {}
224func (*ResourceReference) Descriptor() ([]byte, []int) {
225 return fileDescriptor_465e9122405d1bb5, []int{1}
William Kurkianea869482019-04-09 15:16:11 -0400226}
227
Abhilash S.L3b494632019-07-16 15:51:09 +0530228func (m *ResourceReference) XXX_Unmarshal(b []byte) error {
229 return xxx_messageInfo_ResourceReference.Unmarshal(m, b)
230}
231func (m *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
232 return xxx_messageInfo_ResourceReference.Marshal(b, m, deterministic)
233}
234func (m *ResourceReference) XXX_Merge(src proto.Message) {
235 xxx_messageInfo_ResourceReference.Merge(m, src)
236}
237func (m *ResourceReference) XXX_Size() int {
238 return xxx_messageInfo_ResourceReference.Size(m)
239}
240func (m *ResourceReference) XXX_DiscardUnknown() {
241 xxx_messageInfo_ResourceReference.DiscardUnknown(m)
242}
William Kurkianea869482019-04-09 15:16:11 -0400243
Abhilash S.L3b494632019-07-16 15:51:09 +0530244var xxx_messageInfo_ResourceReference proto.InternalMessageInfo
245
246func (m *ResourceReference) GetType() string {
William Kurkianea869482019-04-09 15:16:11 -0400247 if m != nil {
Abhilash S.L3b494632019-07-16 15:51:09 +0530248 return m.Type
William Kurkianea869482019-04-09 15:16:11 -0400249 }
250 return ""
251}
252
Abhilash S.L3b494632019-07-16 15:51:09 +0530253func (m *ResourceReference) GetChildType() string {
William Kurkianea869482019-04-09 15:16:11 -0400254 if m != nil {
Abhilash S.L3b494632019-07-16 15:51:09 +0530255 return m.ChildType
William Kurkianea869482019-04-09 15:16:11 -0400256 }
257 return ""
258}
259
Abhilash S.L3b494632019-07-16 15:51:09 +0530260var E_ResourceReference = &proto.ExtensionDesc{
261 ExtendedType: (*descriptor.FieldOptions)(nil),
262 ExtensionType: (*ResourceReference)(nil),
263 Field: 1055,
264 Name: "google.api.resource_reference",
265 Tag: "bytes,1055,opt,name=resource_reference",
266 Filename: "google/api/resource.proto",
267}
268
William Kurkianea869482019-04-09 15:16:11 -0400269var E_Resource = &proto.ExtensionDesc{
Abhilash S.L3b494632019-07-16 15:51:09 +0530270 ExtendedType: (*descriptor.MessageOptions)(nil),
271 ExtensionType: (*ResourceDescriptor)(nil),
William Kurkianea869482019-04-09 15:16:11 -0400272 Field: 1053,
273 Name: "google.api.resource",
274 Tag: "bytes,1053,opt,name=resource",
275 Filename: "google/api/resource.proto",
276}
277
William Kurkianea869482019-04-09 15:16:11 -0400278func init() {
Abhilash S.L3b494632019-07-16 15:51:09 +0530279 proto.RegisterEnum("google.api.ResourceDescriptor_History", ResourceDescriptor_History_name, ResourceDescriptor_History_value)
280 proto.RegisterType((*ResourceDescriptor)(nil), "google.api.ResourceDescriptor")
281 proto.RegisterType((*ResourceReference)(nil), "google.api.ResourceReference")
William Kurkianea869482019-04-09 15:16:11 -0400282 proto.RegisterExtension(E_ResourceReference)
Abhilash S.L3b494632019-07-16 15:51:09 +0530283 proto.RegisterExtension(E_Resource)
William Kurkianea869482019-04-09 15:16:11 -0400284}
285
Abhilash S.L3b494632019-07-16 15:51:09 +0530286func init() { proto.RegisterFile("google/api/resource.proto", fileDescriptor_465e9122405d1bb5) }
William Kurkianea869482019-04-09 15:16:11 -0400287
Abhilash S.L3b494632019-07-16 15:51:09 +0530288var fileDescriptor_465e9122405d1bb5 = []byte{
289 // 430 bytes of a gzipped FileDescriptorProto
290 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x41, 0x6f, 0xd3, 0x30,
291 0x18, 0x25, 0x59, 0x45, 0xd7, 0x0f, 0x31, 0x6d, 0x06, 0x89, 0x0c, 0x29, 0x10, 0xf5, 0x80, 0x7a,
292 0x4a, 0xa4, 0x71, 0x1b, 0x17, 0x3a, 0x96, 0x76, 0x91, 0xba, 0x36, 0x72, 0xd3, 0xc3, 0x00, 0x29,
293 0xf2, 0xd2, 0xaf, 0x59, 0xa4, 0xcc, 0xb6, 0x9c, 0xec, 0xd0, 0x1b, 0x7f, 0x04, 0x21, 0xf1, 0x2b,
294 0x39, 0xa2, 0x3a, 0x71, 0x98, 0xd8, 0xb4, 0x9b, 0xf3, 0xde, 0xfb, 0xbe, 0xf7, 0xfc, 0x1c, 0x38,
295 0xce, 0x85, 0xc8, 0x4b, 0x0c, 0x98, 0x2c, 0x02, 0x85, 0x95, 0xb8, 0x53, 0x19, 0xfa, 0x52, 0x89,
296 0x5a, 0x10, 0x68, 0x28, 0x9f, 0xc9, 0xe2, 0xad, 0xd7, 0xca, 0x34, 0x73, 0x7d, 0xb7, 0x09, 0xd6,
297 0x58, 0x65, 0xaa, 0x90, 0xb5, 0x50, 0x8d, 0x7a, 0xf8, 0xc3, 0x06, 0x42, 0xdb, 0x05, 0xe7, 0x1d,
298 0x49, 0x08, 0xf4, 0xea, 0xad, 0x44, 0xc7, 0xf2, 0xac, 0xd1, 0x80, 0xea, 0x33, 0x71, 0xa0, 0x2f,
299 0x59, 0x5d, 0xa3, 0xe2, 0x8e, 0xed, 0xed, 0x8d, 0x06, 0xd4, 0x7c, 0x12, 0x17, 0x80, 0xb3, 0x5b,
300 0x4c, 0x37, 0x05, 0x96, 0x6b, 0x67, 0x4f, 0xcf, 0x0c, 0x76, 0xc8, 0x64, 0x07, 0x90, 0xcf, 0xd0,
301 0xbf, 0x29, 0xaa, 0x5a, 0xa8, 0xad, 0xd3, 0xf3, 0xac, 0xd1, 0xc1, 0xc9, 0x07, 0xff, 0x5f, 0x46,
302 0xff, 0xa1, 0xbb, 0x7f, 0xd1, 0xa8, 0xa9, 0x19, 0x1b, 0x7e, 0x83, 0x7e, 0x8b, 0x91, 0x37, 0xf0,
303 0xea, 0x22, 0x5a, 0x26, 0x0b, 0x7a, 0x95, 0xae, 0xe6, 0xcb, 0x38, 0xfc, 0x12, 0x4d, 0xa2, 0xf0,
304 0xfc, 0xf0, 0x19, 0x71, 0xe1, 0x78, 0x41, 0xa3, 0x69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x3f, 0xd7, 0x73, 0x1f,
316 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x1e, 0x07, 0x80, 0xd8, 0x02, 0x00, 0x00,
William Kurkianea869482019-04-09 15:16:11 -0400317}