resource.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/api/resource.proto
  3. package annotations // import "google.golang.org/genproto/googleapis/api/annotations"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
  8. // Reference imports to suppress errors if they are not otherwise used.
  9. var _ = proto.Marshal
  10. var _ = fmt.Errorf
  11. var _ = math.Inf
  12. // This is a compile-time assertion to ensure that this generated file
  13. // is compatible with the proto package it is being compiled against.
  14. // A compilation error at this line likely means your copy of the
  15. // proto package needs to be updated.
  16. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  17. // A description of the historical or future-looking state of the
  18. // resource pattern.
  19. type ResourceDescriptor_History int32
  20. const (
  21. // The "unset" value.
  22. ResourceDescriptor_HISTORY_UNSPECIFIED ResourceDescriptor_History = 0
  23. // The resource originally had one pattern and launched as such, and
  24. // additional patterns were added later.
  25. ResourceDescriptor_ORIGINALLY_SINGLE_PATTERN ResourceDescriptor_History = 1
  26. // The resource has one pattern, but the API owner expects to add more
  27. // later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
  28. // that from being necessary once there are multiple patterns.)
  29. ResourceDescriptor_FUTURE_MULTI_PATTERN ResourceDescriptor_History = 2
  30. )
  31. var ResourceDescriptor_History_name = map[int32]string{
  32. 0: "HISTORY_UNSPECIFIED",
  33. 1: "ORIGINALLY_SINGLE_PATTERN",
  34. 2: "FUTURE_MULTI_PATTERN",
  35. }
  36. var ResourceDescriptor_History_value = map[string]int32{
  37. "HISTORY_UNSPECIFIED": 0,
  38. "ORIGINALLY_SINGLE_PATTERN": 1,
  39. "FUTURE_MULTI_PATTERN": 2,
  40. }
  41. func (x ResourceDescriptor_History) String() string {
  42. return proto.EnumName(ResourceDescriptor_History_name, int32(x))
  43. }
  44. func (ResourceDescriptor_History) EnumDescriptor() ([]byte, []int) {
  45. return fileDescriptor_resource_1953877c7bf00bf4, []int{0, 0}
  46. }
  47. // A simple descriptor of a resource type.
  48. //
  49. // ResourceDescriptor annotates a resource message (either by means of a
  50. // protobuf annotation or use in the service config), and associates the
  51. // resource's schema, the resource type, and the pattern of the resource name.
  52. //
  53. // Example:
  54. //
  55. // message Topic {
  56. // // Indicates this message defines a resource schema.
  57. // // Declares the resource type in the format of {service}/{kind}.
  58. // // For Kubernetes resources, the format is {api group}/{kind}.
  59. // option (google.api.resource) = {
  60. // type: "pubsub.googleapis.com/Topic"
  61. // pattern: "projects/{project}/topics/{topic}"
  62. // };
  63. // }
  64. //
  65. // Sometimes, resources have multiple patterns, typically because they can
  66. // live under multiple parents.
  67. //
  68. // Example:
  69. //
  70. // message LogEntry {
  71. // option (google.api.resource) = {
  72. // type: "logging.googleapis.com/LogEntry"
  73. // pattern: "projects/{project}/logs/{log}"
  74. // pattern: "organizations/{organization}/logs/{log}"
  75. // pattern: "folders/{folder}/logs/{log}"
  76. // pattern: "billingAccounts/{billing_account}/logs/{log}"
  77. // };
  78. // }
  79. type ResourceDescriptor struct {
  80. // The full name of the resource type. It must be in the format of
  81. // {service_name}/{resource_type_kind}. The resource type names are
  82. // singular and do not contain version numbers.
  83. //
  84. // For example: `storage.googleapis.com/Bucket`
  85. //
  86. // The value of the resource_type_kind must follow the regular expression
  87. // /[A-Z][a-zA-Z0-9]+/. It must start with upper case character and
  88. // recommended to use PascalCase (UpperCamelCase). The maximum number of
  89. // characters allowed for the resource_type_kind is 100.
  90. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  91. // Required. The valid pattern or patterns for this resource's names.
  92. //
  93. // Examples:
  94. // - "projects/{project}/topics/{topic}"
  95. // - "projects/{project}/knowledgeBases/{knowledge_base}"
  96. //
  97. // The components in braces correspond to the IDs for each resource in the
  98. // hierarchy. It is expected that, if multiple patterns are provided,
  99. // the same component name (e.g. "project") refers to IDs of the same
  100. // type of resource.
  101. Pattern []string `protobuf:"bytes,2,rep,name=pattern,proto3" json:"pattern,omitempty"`
  102. // Optional. The field on the resource that designates the resource name
  103. // field. If omitted, this is assumed to be "name".
  104. NameField string `protobuf:"bytes,3,opt,name=name_field,json=nameField,proto3" json:"name_field,omitempty"`
  105. // Optional. The historical or future-looking state of the resource pattern.
  106. //
  107. // Example:
  108. // // The InspectTemplate message originally only supported resource
  109. // // names with organization, and project was added later.
  110. // message InspectTemplate {
  111. // option (google.api.resource) = {
  112. // type: "dlp.googleapis.com/InspectTemplate"
  113. // pattern: "organizations/{organization}/inspectTemplates/{inspect_template}"
  114. // pattern: "projects/{project}/inspectTemplates/{inspect_template}"
  115. // history: ORIGINALLY_SINGLE_PATTERN
  116. // };
  117. // }
  118. History ResourceDescriptor_History `protobuf:"varint,4,opt,name=history,proto3,enum=google.api.ResourceDescriptor_History" json:"history,omitempty"`
  119. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  120. XXX_unrecognized []byte `json:"-"`
  121. XXX_sizecache int32 `json:"-"`
  122. }
  123. func (m *ResourceDescriptor) Reset() { *m = ResourceDescriptor{} }
  124. func (m *ResourceDescriptor) String() string { return proto.CompactTextString(m) }
  125. func (*ResourceDescriptor) ProtoMessage() {}
  126. func (*ResourceDescriptor) Descriptor() ([]byte, []int) {
  127. return fileDescriptor_resource_1953877c7bf00bf4, []int{0}
  128. }
  129. func (m *ResourceDescriptor) XXX_Unmarshal(b []byte) error {
  130. return xxx_messageInfo_ResourceDescriptor.Unmarshal(m, b)
  131. }
  132. func (m *ResourceDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  133. return xxx_messageInfo_ResourceDescriptor.Marshal(b, m, deterministic)
  134. }
  135. func (dst *ResourceDescriptor) XXX_Merge(src proto.Message) {
  136. xxx_messageInfo_ResourceDescriptor.Merge(dst, src)
  137. }
  138. func (m *ResourceDescriptor) XXX_Size() int {
  139. return xxx_messageInfo_ResourceDescriptor.Size(m)
  140. }
  141. func (m *ResourceDescriptor) XXX_DiscardUnknown() {
  142. xxx_messageInfo_ResourceDescriptor.DiscardUnknown(m)
  143. }
  144. var xxx_messageInfo_ResourceDescriptor proto.InternalMessageInfo
  145. func (m *ResourceDescriptor) GetType() string {
  146. if m != nil {
  147. return m.Type
  148. }
  149. return ""
  150. }
  151. func (m *ResourceDescriptor) GetPattern() []string {
  152. if m != nil {
  153. return m.Pattern
  154. }
  155. return nil
  156. }
  157. func (m *ResourceDescriptor) GetNameField() string {
  158. if m != nil {
  159. return m.NameField
  160. }
  161. return ""
  162. }
  163. func (m *ResourceDescriptor) GetHistory() ResourceDescriptor_History {
  164. if m != nil {
  165. return m.History
  166. }
  167. return ResourceDescriptor_HISTORY_UNSPECIFIED
  168. }
  169. // An annotation designating that this field is a reference to a resource
  170. // defined by another message.
  171. type ResourceReference struct {
  172. // The unified resource type name of the type that this field references.
  173. // Marks this as a field referring to a resource in another message.
  174. //
  175. // Example:
  176. //
  177. // message Subscription {
  178. // string topic = 2 [(google.api.resource_reference) = {
  179. // type = "pubsub.googleapis.com/Topic"
  180. // }];
  181. // }
  182. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  183. // The fully-qualified message name of a child of the type that this field
  184. // references.
  185. //
  186. // This is useful for `parent` fields where a resource has more than one
  187. // possible type of parent.
  188. //
  189. // Example:
  190. //
  191. // message ListLogEntriesRequest {
  192. // string parent = 1 [(google.api.resource_reference) = {
  193. // child_type: "logging.googleapis.com/LogEntry"
  194. // };
  195. // }
  196. //
  197. // If the referenced message is in the same proto package, the service name
  198. // may be omitted:
  199. //
  200. // message ListLogEntriesRequest {
  201. // string parent = 1
  202. // [(google.api.resource_reference).child_type = "LogEntry"];
  203. // }
  204. ChildType string `protobuf:"bytes,2,opt,name=child_type,json=childType,proto3" json:"child_type,omitempty"`
  205. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  206. XXX_unrecognized []byte `json:"-"`
  207. XXX_sizecache int32 `json:"-"`
  208. }
  209. func (m *ResourceReference) Reset() { *m = ResourceReference{} }
  210. func (m *ResourceReference) String() string { return proto.CompactTextString(m) }
  211. func (*ResourceReference) ProtoMessage() {}
  212. func (*ResourceReference) Descriptor() ([]byte, []int) {
  213. return fileDescriptor_resource_1953877c7bf00bf4, []int{1}
  214. }
  215. func (m *ResourceReference) XXX_Unmarshal(b []byte) error {
  216. return xxx_messageInfo_ResourceReference.Unmarshal(m, b)
  217. }
  218. func (m *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  219. return xxx_messageInfo_ResourceReference.Marshal(b, m, deterministic)
  220. }
  221. func (dst *ResourceReference) XXX_Merge(src proto.Message) {
  222. xxx_messageInfo_ResourceReference.Merge(dst, src)
  223. }
  224. func (m *ResourceReference) XXX_Size() int {
  225. return xxx_messageInfo_ResourceReference.Size(m)
  226. }
  227. func (m *ResourceReference) XXX_DiscardUnknown() {
  228. xxx_messageInfo_ResourceReference.DiscardUnknown(m)
  229. }
  230. var xxx_messageInfo_ResourceReference proto.InternalMessageInfo
  231. func (m *ResourceReference) GetType() string {
  232. if m != nil {
  233. return m.Type
  234. }
  235. return ""
  236. }
  237. func (m *ResourceReference) GetChildType() string {
  238. if m != nil {
  239. return m.ChildType
  240. }
  241. return ""
  242. }
  243. var E_ResourceReference = &proto.ExtensionDesc{
  244. ExtendedType: (*descriptor.FieldOptions)(nil),
  245. ExtensionType: (*ResourceReference)(nil),
  246. Field: 1055,
  247. Name: "google.api.resource_reference",
  248. Tag: "bytes,1055,opt,name=resource_reference,json=resourceReference",
  249. Filename: "google/api/resource.proto",
  250. }
  251. var E_Resource = &proto.ExtensionDesc{
  252. ExtendedType: (*descriptor.MessageOptions)(nil),
  253. ExtensionType: (*ResourceDescriptor)(nil),
  254. Field: 1053,
  255. Name: "google.api.resource",
  256. Tag: "bytes,1053,opt,name=resource",
  257. Filename: "google/api/resource.proto",
  258. }
  259. func init() {
  260. proto.RegisterType((*ResourceDescriptor)(nil), "google.api.ResourceDescriptor")
  261. proto.RegisterType((*ResourceReference)(nil), "google.api.ResourceReference")
  262. proto.RegisterEnum("google.api.ResourceDescriptor_History", ResourceDescriptor_History_name, ResourceDescriptor_History_value)
  263. proto.RegisterExtension(E_ResourceReference)
  264. proto.RegisterExtension(E_Resource)
  265. }
  266. func init() { proto.RegisterFile("google/api/resource.proto", fileDescriptor_resource_1953877c7bf00bf4) }
  267. var fileDescriptor_resource_1953877c7bf00bf4 = []byte{
  268. // 430 bytes of a gzipped FileDescriptorProto
  269. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x41, 0x6f, 0xd3, 0x30,
  270. 0x18, 0x25, 0x59, 0x45, 0xd7, 0x0f, 0x31, 0x6d, 0x06, 0x89, 0x0c, 0x29, 0x10, 0xf5, 0x80, 0x7a,
  271. 0x4a, 0xa4, 0x71, 0x1b, 0x17, 0x3a, 0x96, 0x76, 0x91, 0xba, 0x36, 0x72, 0xd3, 0xc3, 0x00, 0x29,
  272. 0xf2, 0xd2, 0xaf, 0x59, 0xa4, 0xcc, 0xb6, 0x9c, 0xec, 0xd0, 0x1b, 0x7f, 0x04, 0x21, 0xf1, 0x2b,
  273. 0x39, 0xa2, 0x3a, 0x71, 0x98, 0xd8, 0xb4, 0x9b, 0xf3, 0xde, 0xfb, 0xbe, 0xf7, 0xfc, 0x1c, 0x38,
  274. 0xce, 0x85, 0xc8, 0x4b, 0x0c, 0x98, 0x2c, 0x02, 0x85, 0x95, 0xb8, 0x53, 0x19, 0xfa, 0x52, 0x89,
  275. 0x5a, 0x10, 0x68, 0x28, 0x9f, 0xc9, 0xe2, 0xad, 0xd7, 0xca, 0x34, 0x73, 0x7d, 0xb7, 0x09, 0xd6,
  276. 0x58, 0x65, 0xaa, 0x90, 0xb5, 0x50, 0x8d, 0x7a, 0xf8, 0xc3, 0x06, 0x42, 0xdb, 0x05, 0xe7, 0x1d,
  277. 0x49, 0x08, 0xf4, 0xea, 0xad, 0x44, 0xc7, 0xf2, 0xac, 0xd1, 0x80, 0xea, 0x33, 0x71, 0xa0, 0x2f,
  278. 0x59, 0x5d, 0xa3, 0xe2, 0x8e, 0xed, 0xed, 0x8d, 0x06, 0xd4, 0x7c, 0x12, 0x17, 0x80, 0xb3, 0x5b,
  279. 0x4c, 0x37, 0x05, 0x96, 0x6b, 0x67, 0x4f, 0xcf, 0x0c, 0x76, 0xc8, 0x64, 0x07, 0x90, 0xcf, 0xd0,
  280. 0xbf, 0x29, 0xaa, 0x5a, 0xa8, 0xad, 0xd3, 0xf3, 0xac, 0xd1, 0xc1, 0xc9, 0x07, 0xff, 0x5f, 0x46,
  281. 0xff, 0xa1, 0xbb, 0x7f, 0xd1, 0xa8, 0xa9, 0x19, 0x1b, 0x7e, 0x83, 0x7e, 0x8b, 0x91, 0x37, 0xf0,
  282. 0xea, 0x22, 0x5a, 0x26, 0x0b, 0x7a, 0x95, 0xae, 0xe6, 0xcb, 0x38, 0xfc, 0x12, 0x4d, 0xa2, 0xf0,
  283. 0xfc, 0xf0, 0x19, 0x71, 0xe1, 0x78, 0x41, 0xa3, 0x69, 0x34, 0x1f, 0xcf, 0x66, 0x57, 0xe9, 0x32,
  284. 0x9a, 0x4f, 0x67, 0x61, 0x1a, 0x8f, 0x93, 0x24, 0xa4, 0xf3, 0x43, 0x8b, 0x38, 0xf0, 0x7a, 0xb2,
  285. 0x4a, 0x56, 0x34, 0x4c, 0x2f, 0x57, 0xb3, 0x24, 0xea, 0x18, 0x7b, 0x38, 0x81, 0x23, 0x93, 0x81,
  286. 0xe2, 0x06, 0x15, 0xf2, 0x0c, 0x1f, 0x2d, 0xc0, 0x05, 0xc8, 0x6e, 0x8a, 0x72, 0x9d, 0x6a, 0xc6,
  287. 0x6e, 0xae, 0xa9, 0x91, 0x64, 0x2b, 0xf1, 0xb4, 0x04, 0x62, 0x9e, 0x22, 0x55, 0xdd, 0x22, 0xd7,
  288. 0xdc, 0xd5, 0xbc, 0x81, 0xaf, 0x4b, 0x59, 0xc8, 0xba, 0x10, 0xbc, 0x72, 0x7e, 0xed, 0x7b, 0xd6,
  289. 0xe8, 0xc5, 0x89, 0xfb, 0x58, 0x23, 0x5d, 0x1a, 0x7a, 0xa4, 0xfe, 0x87, 0x4e, 0xbf, 0xc3, 0xbe,
  290. 0x01, 0xc9, 0xfb, 0x07, 0x1e, 0x97, 0x58, 0x55, 0x2c, 0x47, 0xe3, 0xf2, 0xb3, 0x71, 0x79, 0xf7,
  291. 0x74, 0xef, 0xb4, 0xdb, 0x78, 0xc6, 0xe1, 0x20, 0x13, 0xb7, 0xf7, 0xe4, 0x67, 0x2f, 0x8d, 0x3e,
  292. 0xde, 0x79, 0xc4, 0xd6, 0xd7, 0x71, 0x4b, 0xe6, 0xa2, 0x64, 0x3c, 0xf7, 0x85, 0xca, 0x83, 0x1c,
  293. 0xb9, 0x4e, 0x10, 0x34, 0x14, 0x93, 0x45, 0xa5, 0xff, 0x50, 0xc6, 0xb9, 0xa8, 0x99, 0x8e, 0xf2,
  294. 0xe9, 0xde, 0xf9, 0x8f, 0x65, 0xfd, 0xb6, 0x7b, 0xd3, 0x71, 0x1c, 0x5d, 0x3f, 0xd7, 0x73, 0x1f,
  295. 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x1e, 0x07, 0x80, 0xd8, 0x02, 0x00, 0x00,
  296. }