1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/api/resource.proto 3 4package annotations 5 6import ( 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) 13 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. 23const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 25// 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. 66// 67// Example: 68// 69// 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// name_descriptor: { 76// pattern: "projects/{project}/topics/{topic}" 77// parent_type: "cloudresourcemanager.googleapis.com/Project" 78// parent_name_extractor: "projects/{project}" 79// } 80// }; 81// } 82// 83// The ResourceDescriptor Yaml config will look like: 84// 85// resources: 86// - type: "pubsub.googleapis.com/Topic" 87// name_descriptor: 88// - pattern: "projects/{project}/topics/{topic}" 89// parent_type: "cloudresourcemanager.googleapis.com/Project" 90// parent_name_extractor: "projects/{project}" 91// 92// Sometimes, resources have multiple patterns, typically because they can 93// live under multiple parents. 94// 95// Example: 96// 97// message LogEntry { 98// option (google.api.resource) = { 99// type: "logging.googleapis.com/LogEntry" 100// name_descriptor: { 101// pattern: "projects/{project}/logs/{log}" 102// parent_type: "cloudresourcemanager.googleapis.com/Project" 103// parent_name_extractor: "projects/{project}" 104// } 105// name_descriptor: { 106// pattern: "folders/{folder}/logs/{log}" 107// parent_type: "cloudresourcemanager.googleapis.com/Folder" 108// parent_name_extractor: "folders/{folder}" 109// } 110// name_descriptor: { 111// pattern: "organizations/{organization}/logs/{log}" 112// parent_type: "cloudresourcemanager.googleapis.com/Organization" 113// parent_name_extractor: "organizations/{organization}" 114// } 115// name_descriptor: { 116// pattern: "billingAccounts/{billing_account}/logs/{log}" 117// parent_type: "billing.googleapis.com/BillingAccount" 118// parent_name_extractor: "billingAccounts/{billing_account}" 119// } 120// }; 121// } 122// 123// The ResourceDescriptor Yaml config will look like: 124// 125// resources: 126// - type: 'logging.googleapis.com/LogEntry' 127// name_descriptor: 128// - pattern: "projects/{project}/logs/{log}" 129// parent_type: "cloudresourcemanager.googleapis.com/Project" 130// parent_name_extractor: "projects/{project}" 131// - pattern: "folders/{folder}/logs/{log}" 132// parent_type: "cloudresourcemanager.googleapis.com/Folder" 133// parent_name_extractor: "folders/{folder}" 134// - pattern: "organizations/{organization}/logs/{log}" 135// parent_type: "cloudresourcemanager.googleapis.com/Organization" 136// parent_name_extractor: "organizations/{organization}" 137// - pattern: "billingAccounts/{billing_account}/logs/{log}" 138// parent_type: "billing.googleapis.com/BillingAccount" 139// parent_name_extractor: "billingAccounts/{billing_account}" 140// 141// For flexible resources, the resource name doesn't contain parent names, but 142// the resource itself has parents for policy evaluation. 143// 144// Example: 145// 146// message Shelf { 147// option (google.api.resource) = { 148// type: "library.googleapis.com/Shelf" 149// name_descriptor: { 150// pattern: "shelves/{shelf}" 151// parent_type: "cloudresourcemanager.googleapis.com/Project" 152// } 153// name_descriptor: { 154// pattern: "shelves/{shelf}" 155// parent_type: "cloudresourcemanager.googleapis.com/Folder" 156// } 157// }; 158// } 159// 160// The ResourceDescriptor Yaml config will look like: 161// 162// resources: 163// - type: 'library.googleapis.com/Shelf' 164// name_descriptor: 165// - pattern: "shelves/{shelf}" 166// parent_type: "cloudresourcemanager.googleapis.com/Project" 167// - pattern: "shelves/{shelf}" 168// parent_type: "cloudresourcemanager.googleapis.com/Folder" 169type ResourceDescriptor struct { 170 // The resource type. It must be in the format of 171 // {service_name}/{resource_type_kind}. The `resource_type_kind` must be 172 // singular and must not include version numbers. 173 // 174 // Example: `storage.googleapis.com/Bucket` 175 // 176 // The value of the resource_type_kind must follow the regular expression 177 // /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and 178 // should use PascalCase (UpperCamelCase). The maximum number of 179 // characters allowed for the `resource_type_kind` is 100. 180 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 181 // Optional. The relative resource name pattern associated with this resource 182 // type. The DNS prefix of the full resource name shouldn't be specified here. 183 // 184 // The path pattern must follow the syntax, which aligns with HTTP binding 185 // syntax: 186 // 187 // Template = Segment { "/" Segment } ; 188 // Segment = LITERAL | Variable ; 189 // Variable = "{" LITERAL "}" ; 190 // 191 // Examples: 192 // 193 // - "projects/{project}/topics/{topic}" 194 // - "projects/{project}/knowledgeBases/{knowledge_base}" 195 // 196 // The components in braces correspond to the IDs for each resource in the 197 // hierarchy. It is expected that, if multiple patterns are provided, 198 // the same component name (e.g. "project") refers to IDs of the same 199 // type of resource. 200 Pattern []string `protobuf:"bytes,2,rep,name=pattern,proto3" json:"pattern,omitempty"` 201 // Optional. The field on the resource that designates the resource name 202 // field. If omitted, this is assumed to be "name". 203 NameField string `protobuf:"bytes,3,opt,name=name_field,json=nameField,proto3" json:"name_field,omitempty"` 204 // Optional. The historical or future-looking state of the resource pattern. 205 // 206 // Example: 207 // 208 // // The InspectTemplate message originally only supported resource 209 // // names with organization, and project was added later. 210 // message InspectTemplate { 211 // option (google.api.resource) = { 212 // type: "dlp.googleapis.com/InspectTemplate" 213 // pattern: 214 // "organizations/{organization}/inspectTemplates/{inspect_template}" 215 // pattern: "projects/{project}/inspectTemplates/{inspect_template}" 216 // history: ORIGINALLY_SINGLE_PATTERN 217 // }; 218 // } 219 History ResourceDescriptor_History `protobuf:"varint,4,opt,name=history,proto3,enum=google.api.ResourceDescriptor_History" json:"history,omitempty"` 220 // The plural name used in the resource name, such as 'projects' for 221 // the name of 'projects/{project}'. It is the same concept of the `plural` 222 // field in k8s CRD spec 223 // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ 224 Plural string `protobuf:"bytes,5,opt,name=plural,proto3" json:"plural,omitempty"` 225 // The same concept of the `singular` field in k8s CRD spec 226 // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ 227 // Such as "project" for the `resourcemanager.googleapis.com/Project` type. 228 Singular string `protobuf:"bytes,6,opt,name=singular,proto3" json:"singular,omitempty"` 229 XXX_NoUnkeyedLiteral struct{} `json:"-"` 230 XXX_unrecognized []byte `json:"-"` 231 XXX_sizecache int32 `json:"-"` 232} 233 234func (m *ResourceDescriptor) Reset() { *m = ResourceDescriptor{} } 235func (m *ResourceDescriptor) String() string { return proto.CompactTextString(m) } 236func (*ResourceDescriptor) ProtoMessage() {} 237func (*ResourceDescriptor) Descriptor() ([]byte, []int) { 238 return fileDescriptor_465e9122405d1bb5, []int{0} 239} 240 241func (m *ResourceDescriptor) XXX_Unmarshal(b []byte) error { 242 return xxx_messageInfo_ResourceDescriptor.Unmarshal(m, b) 243} 244func (m *ResourceDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 245 return xxx_messageInfo_ResourceDescriptor.Marshal(b, m, deterministic) 246} 247func (m *ResourceDescriptor) XXX_Merge(src proto.Message) { 248 xxx_messageInfo_ResourceDescriptor.Merge(m, src) 249} 250func (m *ResourceDescriptor) XXX_Size() int { 251 return xxx_messageInfo_ResourceDescriptor.Size(m) 252} 253func (m *ResourceDescriptor) XXX_DiscardUnknown() { 254 xxx_messageInfo_ResourceDescriptor.DiscardUnknown(m) 255} 256 257var xxx_messageInfo_ResourceDescriptor proto.InternalMessageInfo 258 259func (m *ResourceDescriptor) GetType() string { 260 if m != nil { 261 return m.Type 262 } 263 return "" 264} 265 266func (m *ResourceDescriptor) GetPattern() []string { 267 if m != nil { 268 return m.Pattern 269 } 270 return nil 271} 272 273func (m *ResourceDescriptor) GetNameField() string { 274 if m != nil { 275 return m.NameField 276 } 277 return "" 278} 279 280func (m *ResourceDescriptor) GetHistory() ResourceDescriptor_History { 281 if m != nil { 282 return m.History 283 } 284 return ResourceDescriptor_HISTORY_UNSPECIFIED 285} 286 287func (m *ResourceDescriptor) GetPlural() string { 288 if m != nil { 289 return m.Plural 290 } 291 return "" 292} 293 294func (m *ResourceDescriptor) GetSingular() string { 295 if m != nil { 296 return m.Singular 297 } 298 return "" 299} 300 301// Defines a proto annotation that describes a string field that refers to 302// an API resource. 303type ResourceReference struct { 304 // The resource type that the annotated field references. 305 // 306 // Example: 307 // 308 // message Subscription { 309 // string topic = 2 [(google.api.resource_reference) = { 310 // type: "pubsub.googleapis.com/Topic" 311 // }]; 312 // } 313 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 314 // The resource type of a child collection that the annotated field 315 // references. This is useful for annotating the `parent` field that 316 // doesn't have a fixed resource type. 317 // 318 // Example: 319 // 320 // message ListLogEntriesRequest { 321 // string parent = 1 [(google.api.resource_reference) = { 322 // child_type: "logging.googleapis.com/LogEntry" 323 // }; 324 // } 325 ChildType string `protobuf:"bytes,2,opt,name=child_type,json=childType,proto3" json:"child_type,omitempty"` 326 XXX_NoUnkeyedLiteral struct{} `json:"-"` 327 XXX_unrecognized []byte `json:"-"` 328 XXX_sizecache int32 `json:"-"` 329} 330 331func (m *ResourceReference) Reset() { *m = ResourceReference{} } 332func (m *ResourceReference) String() string { return proto.CompactTextString(m) } 333func (*ResourceReference) ProtoMessage() {} 334func (*ResourceReference) Descriptor() ([]byte, []int) { 335 return fileDescriptor_465e9122405d1bb5, []int{1} 336} 337 338func (m *ResourceReference) XXX_Unmarshal(b []byte) error { 339 return xxx_messageInfo_ResourceReference.Unmarshal(m, b) 340} 341func (m *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 342 return xxx_messageInfo_ResourceReference.Marshal(b, m, deterministic) 343} 344func (m *ResourceReference) XXX_Merge(src proto.Message) { 345 xxx_messageInfo_ResourceReference.Merge(m, src) 346} 347func (m *ResourceReference) XXX_Size() int { 348 return xxx_messageInfo_ResourceReference.Size(m) 349} 350func (m *ResourceReference) XXX_DiscardUnknown() { 351 xxx_messageInfo_ResourceReference.DiscardUnknown(m) 352} 353 354var xxx_messageInfo_ResourceReference proto.InternalMessageInfo 355 356func (m *ResourceReference) GetType() string { 357 if m != nil { 358 return m.Type 359 } 360 return "" 361} 362 363func (m *ResourceReference) GetChildType() string { 364 if m != nil { 365 return m.ChildType 366 } 367 return "" 368} 369 370var E_ResourceReference = &proto.ExtensionDesc{ 371 ExtendedType: (*descriptor.FieldOptions)(nil), 372 ExtensionType: (*ResourceReference)(nil), 373 Field: 1055, 374 Name: "google.api.resource_reference", 375 Tag: "bytes,1055,opt,name=resource_reference", 376 Filename: "google/api/resource.proto", 377} 378 379var E_ResourceDefinition = &proto.ExtensionDesc{ 380 ExtendedType: (*descriptor.FileOptions)(nil), 381 ExtensionType: ([]*ResourceDescriptor)(nil), 382 Field: 1053, 383 Name: "google.api.resource_definition", 384 Tag: "bytes,1053,rep,name=resource_definition", 385 Filename: "google/api/resource.proto", 386} 387 388var E_Resource = &proto.ExtensionDesc{ 389 ExtendedType: (*descriptor.MessageOptions)(nil), 390 ExtensionType: (*ResourceDescriptor)(nil), 391 Field: 1053, 392 Name: "google.api.resource", 393 Tag: "bytes,1053,opt,name=resource", 394 Filename: "google/api/resource.proto", 395} 396 397func init() { 398 proto.RegisterEnum("google.api.ResourceDescriptor_History", ResourceDescriptor_History_name, ResourceDescriptor_History_value) 399 proto.RegisterType((*ResourceDescriptor)(nil), "google.api.ResourceDescriptor") 400 proto.RegisterType((*ResourceReference)(nil), "google.api.ResourceReference") 401 proto.RegisterExtension(E_ResourceReference) 402 proto.RegisterExtension(E_ResourceDefinition) 403 proto.RegisterExtension(E_Resource) 404} 405 406func init() { 407 proto.RegisterFile("google/api/resource.proto", fileDescriptor_465e9122405d1bb5) 408} 409 410var fileDescriptor_465e9122405d1bb5 = []byte{ 411 // 490 bytes of a gzipped FileDescriptorProto 412 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcd, 0x6e, 0xd3, 0x4c, 413 0x14, 0xfd, 0x9c, 0xe4, 0xcb, 0xcf, 0xad, 0xa8, 0xda, 0x29, 0x02, 0xb7, 0x22, 0x60, 0x65, 0x81, 414 0xb2, 0xb2, 0xa5, 0xb0, 0x0b, 0x1b, 0x52, 0xe2, 0xa4, 0x96, 0xd2, 0xc4, 0x9a, 0x38, 0x8b, 0x02, 415 0x92, 0x35, 0x75, 0x26, 0xee, 0x48, 0xee, 0xcc, 0x68, 0xec, 0x2c, 0xf2, 0x30, 0x08, 0x89, 0x67, 416 0xe0, 0xe1, 0x58, 0xa2, 0x8c, 0x7f, 0x88, 0x68, 0x84, 0xd8, 0xcd, 0xbd, 0xe7, 0xde, 0x73, 0x8e, 417 0xcf, 0x95, 0xe1, 0x32, 0x16, 0x22, 0x4e, 0xa8, 0x43, 0x24, 0x73, 0x14, 0x4d, 0xc5, 0x56, 0x45, 418 0xd4, 0x96, 0x4a, 0x64, 0x02, 0x41, 0x0e, 0xd9, 0x44, 0xb2, 0x2b, 0xab, 0x18, 0xd3, 0xc8, 0xfd, 419 0x76, 0xe3, 0xac, 0x69, 0x1a, 0x29, 0x26, 0x33, 0xa1, 0xf2, 0xe9, 0xde, 0x8f, 0x1a, 0x20, 0x5c, 420 0x10, 0x8c, 0x2b, 0x10, 0x21, 0x68, 0x64, 0x3b, 0x49, 0x4d, 0xc3, 0x32, 0xfa, 0x1d, 0xac, 0xdf, 421 0xc8, 0x84, 0x96, 0x24, 0x59, 0x46, 0x15, 0x37, 0x6b, 0x56, 0xbd, 0xdf, 0xc1, 0x65, 0x89, 0xba, 422 0x00, 0x9c, 0x3c, 0xd2, 0x70, 0xc3, 0x68, 0xb2, 0x36, 0xeb, 0x7a, 0xa7, 0xb3, 0xef, 0x4c, 0xf6, 423 0x0d, 0xf4, 0x01, 0x5a, 0x0f, 0x2c, 0xcd, 0x84, 0xda, 0x99, 0x0d, 0xcb, 0xe8, 0x9f, 0x0e, 0xde, 424 0xda, 0xbf, 0x3d, 0xda, 0x4f, 0xd5, 0xed, 0x9b, 0x7c, 0x1a, 0x97, 0x6b, 0xe8, 0x05, 0x34, 0x65, 425 0xb2, 0x55, 0x24, 0x31, 0xff, 0xd7, 0xe4, 0x45, 0x85, 0xae, 0xa0, 0x9d, 0x32, 0x1e, 0x6f, 0x13, 426 0xa2, 0xcc, 0xa6, 0x46, 0xaa, 0xba, 0xf7, 0x19, 0x5a, 0x05, 0x0f, 0x7a, 0x09, 0x17, 0x37, 0xde, 427 0x32, 0x58, 0xe0, 0xbb, 0x70, 0x35, 0x5f, 0xfa, 0xee, 0x47, 0x6f, 0xe2, 0xb9, 0xe3, 0xb3, 0xff, 428 0x50, 0x17, 0x2e, 0x17, 0xd8, 0x9b, 0x7a, 0xf3, 0xd1, 0x6c, 0x76, 0x17, 0x2e, 0xbd, 0xf9, 0x74, 429 0xe6, 0x86, 0xfe, 0x28, 0x08, 0x5c, 0x3c, 0x3f, 0x33, 0x90, 0x09, 0xcf, 0x27, 0xab, 0x60, 0x85, 430 0xdd, 0xf0, 0x76, 0x35, 0x0b, 0xbc, 0x0a, 0xa9, 0xf5, 0x26, 0x70, 0x5e, 0xfa, 0xc6, 0x74, 0x43, 431 0x15, 0xe5, 0x11, 0x3d, 0x1a, 0x5a, 0x17, 0x20, 0x7a, 0x60, 0xc9, 0x3a, 0xd4, 0x48, 0x2d, 0x8f, 432 0x46, 0x77, 0x82, 0x9d, 0xa4, 0xc3, 0x04, 0x50, 0x79, 0xbe, 0x50, 0x55, 0x44, 0xdd, 0x32, 0x9f, 433 0xf2, 0x6e, 0xb6, 0x0e, 0x72, 0x21, 0x33, 0x26, 0x78, 0x6a, 0x7e, 0x6b, 0x5b, 0x46, 0xff, 0x64, 434 0xd0, 0x3d, 0x96, 0x62, 0xe5, 0x06, 0x9f, 0xab, 0x3f, 0x5b, 0x43, 0x0e, 0x17, 0x95, 0xda, 0x9a, 435 0x6e, 0x18, 0x67, 0x7b, 0x42, 0xf4, 0xea, 0x88, 0x5c, 0x42, 0x4b, 0xb5, 0xaf, 0x6d, 0xab, 0xde, 436 0x3f, 0x19, 0xbc, 0xfe, 0xfb, 0xcd, 0x70, 0xf5, 0x1d, 0xe3, 0x8a, 0x78, 0xf8, 0x05, 0xda, 0x65, 437 0x17, 0xbd, 0x79, 0x22, 0x72, 0x4b, 0xd3, 0x94, 0xc4, 0x87, 0x3a, 0xc6, 0x3f, 0xe8, 0x54, 0x8c, 438 0xd7, 0x1c, 0x4e, 0x23, 0xf1, 0x78, 0x30, 0x7e, 0xfd, 0xac, 0x9c, 0xf7, 0xf7, 0x1a, 0xbe, 0xf1, 439 0x69, 0x54, 0x80, 0xb1, 0x48, 0x08, 0x8f, 0x6d, 0xa1, 0x62, 0x27, 0xa6, 0x5c, 0x3b, 0x70, 0x72, 440 0x88, 0x48, 0x96, 0xea, 0xbf, 0x88, 0x70, 0x2e, 0x32, 0xa2, 0xad, 0xbc, 0x3f, 0x78, 0xff, 0x34, 441 0x8c, 0xef, 0xb5, 0xc6, 0x74, 0xe4, 0x7b, 0xf7, 0x4d, 0xbd, 0xf7, 0xee, 0x57, 0x00, 0x00, 0x00, 442 0xff, 0xff, 0x75, 0x12, 0x53, 0xef, 0x7c, 0x03, 0x00, 0x00, 443} 444