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// 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 full name of the resource type. It must be in the format of 95 // {service_name}/{resource_type_kind}. The resource type names are 96 // singular and do not contain version numbers. 97 // 98 // For example: `storage.googleapis.com/Bucket` 99 // 100 // The value of the resource_type_kind must follow the regular expression 101 // /[A-Z][a-zA-Z0-9]+/. It must start with upper case character and 102 // recommended to 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 // Required. The valid pattern or patterns for this resource's names. 106 // 107 // Examples: 108 // - "projects/{project}/topics/{topic}" 109 // - "projects/{project}/knowledgeBases/{knowledge_base}" 110 // 111 // 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. 120 // 121 // Example: 122 // // 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: "organizations/{organization}/inspectTemplates/{inspect_template}" 128 // pattern: "projects/{project}/inspectTemplates/{inspect_template}" 129 // history: ORIGINALLY_SINGLE_PATTERN 130 // }; 131 // } 132 History ResourceDescriptor_History `protobuf:"varint,4,opt,name=history,proto3,enum=google.api.ResourceDescriptor_History" json:"history,omitempty"` 133 XXX_NoUnkeyedLiteral struct{} `json:"-"` 134 XXX_unrecognized []byte `json:"-"` 135 XXX_sizecache int32 `json:"-"` 136} 137 138func (m *ResourceDescriptor) Reset() { *m = ResourceDescriptor{} } 139func (m *ResourceDescriptor) String() string { return proto.CompactTextString(m) } 140func (*ResourceDescriptor) ProtoMessage() {} 141func (*ResourceDescriptor) Descriptor() ([]byte, []int) { 142 return fileDescriptor_465e9122405d1bb5, []int{0} 143} 144 145func (m *ResourceDescriptor) XXX_Unmarshal(b []byte) error { 146 return xxx_messageInfo_ResourceDescriptor.Unmarshal(m, b) 147} 148func (m *ResourceDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 149 return xxx_messageInfo_ResourceDescriptor.Marshal(b, m, deterministic) 150} 151func (m *ResourceDescriptor) XXX_Merge(src proto.Message) { 152 xxx_messageInfo_ResourceDescriptor.Merge(m, src) 153} 154func (m *ResourceDescriptor) XXX_Size() int { 155 return xxx_messageInfo_ResourceDescriptor.Size(m) 156} 157func (m *ResourceDescriptor) XXX_DiscardUnknown() { 158 xxx_messageInfo_ResourceDescriptor.DiscardUnknown(m) 159} 160 161var xxx_messageInfo_ResourceDescriptor proto.InternalMessageInfo 162 163func (m *ResourceDescriptor) GetType() string { 164 if m != nil { 165 return m.Type 166 } 167 return "" 168} 169 170func (m *ResourceDescriptor) GetPattern() []string { 171 if m != nil { 172 return m.Pattern 173 } 174 return nil 175} 176 177func (m *ResourceDescriptor) GetNameField() string { 178 if m != nil { 179 return m.NameField 180 } 181 return "" 182} 183 184func (m *ResourceDescriptor) GetHistory() ResourceDescriptor_History { 185 if m != nil { 186 return m.History 187 } 188 return ResourceDescriptor_HISTORY_UNSPECIFIED 189} 190 191// An annotation designating that this field is a reference to a resource 192// defined by another message. 193type ResourceReference struct { 194 // The unified resource type name of the type that this field references. 195 // Marks this as a field referring to a resource in another message. 196 // 197 // Example: 198 // 199 // message Subscription { 200 // string topic = 2 [(google.api.resource_reference) = { 201 // type = "pubsub.googleapis.com/Topic" 202 // }]; 203 // } 204 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 205 // The fully-qualified message name of a child of the type that this field 206 // references. 207 // 208 // This is useful for `parent` fields where a resource has more than one 209 // possible type of parent. 210 // 211 // Example: 212 // 213 // message ListLogEntriesRequest { 214 // string parent = 1 [(google.api.resource_reference) = { 215 // child_type: "logging.googleapis.com/LogEntry" 216 // }; 217 // } 218 // 219 // If the referenced message is in the same proto package, the service name 220 // may be omitted: 221 // 222 // message ListLogEntriesRequest { 223 // string parent = 1 224 // [(google.api.resource_reference).child_type = "LogEntry"]; 225 // } 226 ChildType string `protobuf:"bytes,2,opt,name=child_type,json=childType,proto3" json:"child_type,omitempty"` 227 XXX_NoUnkeyedLiteral struct{} `json:"-"` 228 XXX_unrecognized []byte `json:"-"` 229 XXX_sizecache int32 `json:"-"` 230} 231 232func (m *ResourceReference) Reset() { *m = ResourceReference{} } 233func (m *ResourceReference) String() string { return proto.CompactTextString(m) } 234func (*ResourceReference) ProtoMessage() {} 235func (*ResourceReference) Descriptor() ([]byte, []int) { 236 return fileDescriptor_465e9122405d1bb5, []int{1} 237} 238 239func (m *ResourceReference) XXX_Unmarshal(b []byte) error { 240 return xxx_messageInfo_ResourceReference.Unmarshal(m, b) 241} 242func (m *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 243 return xxx_messageInfo_ResourceReference.Marshal(b, m, deterministic) 244} 245func (m *ResourceReference) XXX_Merge(src proto.Message) { 246 xxx_messageInfo_ResourceReference.Merge(m, src) 247} 248func (m *ResourceReference) XXX_Size() int { 249 return xxx_messageInfo_ResourceReference.Size(m) 250} 251func (m *ResourceReference) XXX_DiscardUnknown() { 252 xxx_messageInfo_ResourceReference.DiscardUnknown(m) 253} 254 255var xxx_messageInfo_ResourceReference proto.InternalMessageInfo 256 257func (m *ResourceReference) GetType() string { 258 if m != nil { 259 return m.Type 260 } 261 return "" 262} 263 264func (m *ResourceReference) GetChildType() string { 265 if m != nil { 266 return m.ChildType 267 } 268 return "" 269} 270 271var E_ResourceReference = &proto.ExtensionDesc{ 272 ExtendedType: (*descriptor.FieldOptions)(nil), 273 ExtensionType: (*ResourceReference)(nil), 274 Field: 1055, 275 Name: "google.api.resource_reference", 276 Tag: "bytes,1055,opt,name=resource_reference", 277 Filename: "google/api/resource.proto", 278} 279 280var E_Resource = &proto.ExtensionDesc{ 281 ExtendedType: (*descriptor.MessageOptions)(nil), 282 ExtensionType: (*ResourceDescriptor)(nil), 283 Field: 1053, 284 Name: "google.api.resource", 285 Tag: "bytes,1053,opt,name=resource", 286 Filename: "google/api/resource.proto", 287} 288 289func init() { 290 proto.RegisterEnum("google.api.ResourceDescriptor_History", ResourceDescriptor_History_name, ResourceDescriptor_History_value) 291 proto.RegisterType((*ResourceDescriptor)(nil), "google.api.ResourceDescriptor") 292 proto.RegisterType((*ResourceReference)(nil), "google.api.ResourceReference") 293 proto.RegisterExtension(E_ResourceReference) 294 proto.RegisterExtension(E_Resource) 295} 296 297func init() { proto.RegisterFile("google/api/resource.proto", fileDescriptor_465e9122405d1bb5) } 298 299var fileDescriptor_465e9122405d1bb5 = []byte{ 300 // 430 bytes of a gzipped FileDescriptorProto 301 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x41, 0x6f, 0xd3, 0x30, 302 0x18, 0x25, 0x59, 0x45, 0xd7, 0x0f, 0x31, 0x6d, 0x06, 0x89, 0x0c, 0x29, 0x10, 0xf5, 0x80, 0x7a, 303 0x4a, 0xa4, 0x71, 0x1b, 0x17, 0x3a, 0x96, 0x76, 0x91, 0xba, 0x36, 0x72, 0xd3, 0xc3, 0x00, 0x29, 304 0xf2, 0xd2, 0xaf, 0x59, 0xa4, 0xcc, 0xb6, 0x9c, 0xec, 0xd0, 0x1b, 0x7f, 0x04, 0x21, 0xf1, 0x2b, 305 0x39, 0xa2, 0x3a, 0x71, 0x98, 0xd8, 0xb4, 0x9b, 0xf3, 0xde, 0xfb, 0xbe, 0xf7, 0xfc, 0x1c, 0x38, 306 0xce, 0x85, 0xc8, 0x4b, 0x0c, 0x98, 0x2c, 0x02, 0x85, 0x95, 0xb8, 0x53, 0x19, 0xfa, 0x52, 0x89, 307 0x5a, 0x10, 0x68, 0x28, 0x9f, 0xc9, 0xe2, 0xad, 0xd7, 0xca, 0x34, 0x73, 0x7d, 0xb7, 0x09, 0xd6, 308 0x58, 0x65, 0xaa, 0x90, 0xb5, 0x50, 0x8d, 0x7a, 0xf8, 0xc3, 0x06, 0x42, 0xdb, 0x05, 0xe7, 0x1d, 309 0x49, 0x08, 0xf4, 0xea, 0xad, 0x44, 0xc7, 0xf2, 0xac, 0xd1, 0x80, 0xea, 0x33, 0x71, 0xa0, 0x2f, 310 0x59, 0x5d, 0xa3, 0xe2, 0x8e, 0xed, 0xed, 0x8d, 0x06, 0xd4, 0x7c, 0x12, 0x17, 0x80, 0xb3, 0x5b, 311 0x4c, 0x37, 0x05, 0x96, 0x6b, 0x67, 0x4f, 0xcf, 0x0c, 0x76, 0xc8, 0x64, 0x07, 0x90, 0xcf, 0xd0, 312 0xbf, 0x29, 0xaa, 0x5a, 0xa8, 0xad, 0xd3, 0xf3, 0xac, 0xd1, 0xc1, 0xc9, 0x07, 0xff, 0x5f, 0x46, 313 0xff, 0xa1, 0xbb, 0x7f, 0xd1, 0xa8, 0xa9, 0x19, 0x1b, 0x7e, 0x83, 0x7e, 0x8b, 0x91, 0x37, 0xf0, 314 0xea, 0x22, 0x5a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 0xa5, 0xff, 0x50, 0xc6, 0xb9, 0xa8, 0x99, 0x8e, 0xf2, 326 0xe9, 0xde, 0xf9, 0x8f, 0x65, 0xfd, 0xb6, 0x7b, 0xd3, 0x71, 0x1c, 0x5d, 0x3f, 0xd7, 0x73, 0x1f, 327 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x1e, 0x07, 0x80, 0xd8, 0x02, 0x00, 0x00, 328} 329