Protobuf model and library code for oaktree
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

common.pb.go 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. // Code generated by protoc-gen-go.
  2. // source: common.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package oaktree is a generated protocol buffer package.
  6. It is generated from these files:
  7. common.proto
  8. It has these top-level messages:
  9. Project
  10. Location
  11. Filter
  12. */
  13. package oaktree
  14. import proto "github.com/golang/protobuf/proto"
  15. import fmt "fmt"
  16. import math "math"
  17. // Reference imports to suppress errors if they are not otherwise used.
  18. var _ = proto.Marshal
  19. var _ = fmt.Errorf
  20. var _ = math.Inf
  21. // This is a compile-time assertion to ensure that this generated file
  22. // is compatible with the proto package it is being compiled against.
  23. // A compilation error at this line likely means your copy of the
  24. // proto package needs to be updated.
  25. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  26. type Project struct {
  27. // Types that are valid to be assigned to Project:
  28. // *Project_Id
  29. // *Project_Name
  30. Project isProject_Project `protobuf_oneof:"project"`
  31. // Types that are valid to be assigned to Domain:
  32. // *Project_DomainId
  33. // *Project_DomainName
  34. Domain isProject_Domain `protobuf_oneof:"domain"`
  35. }
  36. func (m *Project) Reset() { *m = Project{} }
  37. func (m *Project) String() string { return proto.CompactTextString(m) }
  38. func (*Project) ProtoMessage() {}
  39. func (*Project) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  40. type isProject_Project interface {
  41. isProject_Project()
  42. }
  43. type isProject_Domain interface {
  44. isProject_Domain()
  45. }
  46. type Project_Id struct {
  47. Id string `protobuf:"bytes,1,opt,name=id,oneof"`
  48. }
  49. type Project_Name struct {
  50. Name string `protobuf:"bytes,2,opt,name=name,oneof"`
  51. }
  52. type Project_DomainId struct {
  53. DomainId string `protobuf:"bytes,3,opt,name=domain_id,json=domainId,oneof"`
  54. }
  55. type Project_DomainName struct {
  56. DomainName string `protobuf:"bytes,4,opt,name=domain_name,json=domainName,oneof"`
  57. }
  58. func (*Project_Id) isProject_Project() {}
  59. func (*Project_Name) isProject_Project() {}
  60. func (*Project_DomainId) isProject_Domain() {}
  61. func (*Project_DomainName) isProject_Domain() {}
  62. func (m *Project) GetProject() isProject_Project {
  63. if m != nil {
  64. return m.Project
  65. }
  66. return nil
  67. }
  68. func (m *Project) GetDomain() isProject_Domain {
  69. if m != nil {
  70. return m.Domain
  71. }
  72. return nil
  73. }
  74. func (m *Project) GetId() string {
  75. if x, ok := m.GetProject().(*Project_Id); ok {
  76. return x.Id
  77. }
  78. return ""
  79. }
  80. func (m *Project) GetName() string {
  81. if x, ok := m.GetProject().(*Project_Name); ok {
  82. return x.Name
  83. }
  84. return ""
  85. }
  86. func (m *Project) GetDomainId() string {
  87. if x, ok := m.GetDomain().(*Project_DomainId); ok {
  88. return x.DomainId
  89. }
  90. return ""
  91. }
  92. func (m *Project) GetDomainName() string {
  93. if x, ok := m.GetDomain().(*Project_DomainName); ok {
  94. return x.DomainName
  95. }
  96. return ""
  97. }
  98. // XXX_OneofFuncs is for the internal use of the proto package.
  99. func (*Project) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  100. return _Project_OneofMarshaler, _Project_OneofUnmarshaler, _Project_OneofSizer, []interface{}{
  101. (*Project_Id)(nil),
  102. (*Project_Name)(nil),
  103. (*Project_DomainId)(nil),
  104. (*Project_DomainName)(nil),
  105. }
  106. }
  107. func _Project_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  108. m := msg.(*Project)
  109. // project
  110. switch x := m.Project.(type) {
  111. case *Project_Id:
  112. b.EncodeVarint(1<<3 | proto.WireBytes)
  113. b.EncodeStringBytes(x.Id)
  114. case *Project_Name:
  115. b.EncodeVarint(2<<3 | proto.WireBytes)
  116. b.EncodeStringBytes(x.Name)
  117. case nil:
  118. default:
  119. return fmt.Errorf("Project.Project has unexpected type %T", x)
  120. }
  121. // domain
  122. switch x := m.Domain.(type) {
  123. case *Project_DomainId:
  124. b.EncodeVarint(3<<3 | proto.WireBytes)
  125. b.EncodeStringBytes(x.DomainId)
  126. case *Project_DomainName:
  127. b.EncodeVarint(4<<3 | proto.WireBytes)
  128. b.EncodeStringBytes(x.DomainName)
  129. case nil:
  130. default:
  131. return fmt.Errorf("Project.Domain has unexpected type %T", x)
  132. }
  133. return nil
  134. }
  135. func _Project_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  136. m := msg.(*Project)
  137. switch tag {
  138. case 1: // project.id
  139. if wire != proto.WireBytes {
  140. return true, proto.ErrInternalBadWireType
  141. }
  142. x, err := b.DecodeStringBytes()
  143. m.Project = &Project_Id{x}
  144. return true, err
  145. case 2: // project.name
  146. if wire != proto.WireBytes {
  147. return true, proto.ErrInternalBadWireType
  148. }
  149. x, err := b.DecodeStringBytes()
  150. m.Project = &Project_Name{x}
  151. return true, err
  152. case 3: // domain.domain_id
  153. if wire != proto.WireBytes {
  154. return true, proto.ErrInternalBadWireType
  155. }
  156. x, err := b.DecodeStringBytes()
  157. m.Domain = &Project_DomainId{x}
  158. return true, err
  159. case 4: // domain.domain_name
  160. if wire != proto.WireBytes {
  161. return true, proto.ErrInternalBadWireType
  162. }
  163. x, err := b.DecodeStringBytes()
  164. m.Domain = &Project_DomainName{x}
  165. return true, err
  166. default:
  167. return false, nil
  168. }
  169. }
  170. func _Project_OneofSizer(msg proto.Message) (n int) {
  171. m := msg.(*Project)
  172. // project
  173. switch x := m.Project.(type) {
  174. case *Project_Id:
  175. n += proto.SizeVarint(1<<3 | proto.WireBytes)
  176. n += proto.SizeVarint(uint64(len(x.Id)))
  177. n += len(x.Id)
  178. case *Project_Name:
  179. n += proto.SizeVarint(2<<3 | proto.WireBytes)
  180. n += proto.SizeVarint(uint64(len(x.Name)))
  181. n += len(x.Name)
  182. case nil:
  183. default:
  184. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  185. }
  186. // domain
  187. switch x := m.Domain.(type) {
  188. case *Project_DomainId:
  189. n += proto.SizeVarint(3<<3 | proto.WireBytes)
  190. n += proto.SizeVarint(uint64(len(x.DomainId)))
  191. n += len(x.DomainId)
  192. case *Project_DomainName:
  193. n += proto.SizeVarint(4<<3 | proto.WireBytes)
  194. n += proto.SizeVarint(uint64(len(x.DomainName)))
  195. n += len(x.DomainName)
  196. case nil:
  197. default:
  198. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  199. }
  200. return n
  201. }
  202. type Location struct {
  203. Cloud string `protobuf:"bytes,1,opt,name=cloud" json:"cloud,omitempty"`
  204. Region string `protobuf:"bytes,2,opt,name=region" json:"region,omitempty"`
  205. Zone string `protobuf:"bytes,3,opt,name=zone" json:"zone,omitempty"`
  206. Project *Project `protobuf:"bytes,4,opt,name=project" json:"project,omitempty"`
  207. }
  208. func (m *Location) Reset() { *m = Location{} }
  209. func (m *Location) String() string { return proto.CompactTextString(m) }
  210. func (*Location) ProtoMessage() {}
  211. func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  212. func (m *Location) GetProject() *Project {
  213. if m != nil {
  214. return m.Project
  215. }
  216. return nil
  217. }
  218. type Filter struct {
  219. Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"`
  220. NameOrId string `protobuf:"bytes,2,opt,name=name_or_id,json=nameOrId" json:"name_or_id,omitempty"`
  221. Jmespath string `protobuf:"bytes,3,opt,name=jmespath" json:"jmespath,omitempty"`
  222. Filter map[string]string `protobuf:"bytes,4,rep,name=filter" json:"filter,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  223. }
  224. func (m *Filter) Reset() { *m = Filter{} }
  225. func (m *Filter) String() string { return proto.CompactTextString(m) }
  226. func (*Filter) ProtoMessage() {}
  227. func (*Filter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  228. func (m *Filter) GetLocation() *Location {
  229. if m != nil {
  230. return m.Location
  231. }
  232. return nil
  233. }
  234. func (m *Filter) GetFilter() map[string]string {
  235. if m != nil {
  236. return m.Filter
  237. }
  238. return nil
  239. }
  240. func init() {
  241. proto.RegisterType((*Project)(nil), "oaktree.Project")
  242. proto.RegisterType((*Location)(nil), "oaktree.Location")
  243. proto.RegisterType((*Filter)(nil), "oaktree.Filter")
  244. }
  245. func init() { proto.RegisterFile("common.proto", fileDescriptor0) }
  246. var fileDescriptor0 = []byte{
  247. // 326 bytes of a gzipped FileDescriptorProto
  248. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0x91, 0xc1, 0x4e, 0xf3, 0x30,
  249. 0x0c, 0xc7, 0xbf, 0x6e, 0xfb, 0xba, 0xce, 0xe5, 0x30, 0x2c, 0x84, 0xa6, 0x01, 0x12, 0xec, 0x84,
  250. 0x90, 0xd8, 0x61, 0xbb, 0x00, 0xc7, 0x49, 0x20, 0x90, 0x10, 0xa0, 0xbc, 0xc0, 0x14, 0xba, 0x00,
  251. 0xdd, 0xda, 0xb8, 0x0a, 0x19, 0x62, 0x3c, 0x01, 0xaf, 0xc9, 0x9b, 0x90, 0x26, 0x5e, 0xc5, 0x29,
  252. 0xf6, 0xdf, 0x8e, 0xfe, 0x3f, 0xdb, 0xb0, 0x93, 0x51, 0x59, 0x92, 0x1e, 0x57, 0x86, 0x2c, 0x61,
  253. 0x97, 0xe4, 0xca, 0x1a, 0xa5, 0x46, 0xdf, 0x11, 0x74, 0x9f, 0x0c, 0x2d, 0x55, 0x66, 0xb1, 0x0f,
  254. 0xad, 0x7c, 0x31, 0x88, 0x8e, 0xa3, 0xd3, 0xde, 0xed, 0x3f, 0xe1, 0x62, 0xdc, 0x83, 0x8e, 0x96,
  255. 0xa5, 0x1a, 0xb4, 0x58, 0xf3, 0x19, 0x1e, 0x41, 0x6f, 0x41, 0xa5, 0xcc, 0xf5, 0xdc, 0xb5, 0xb7,
  256. 0x7d, 0x29, 0x12, 0x49, 0x90, 0xee, 0x16, 0x78, 0x02, 0x29, 0x97, 0xfd, 0xdf, 0x0e, 0x37, 0x40,
  257. 0x10, 0x1f, 0x9c, 0x36, 0xeb, 0x41, 0xb7, 0x0a, 0xa6, 0xb3, 0x04, 0xe2, 0x50, 0x18, 0x7d, 0x42,
  258. 0x72, 0x4f, 0x99, 0xb4, 0x39, 0x69, 0x67, 0xfc, 0x3f, 0x2b, 0x68, 0xcd, 0x34, 0x22, 0x24, 0xb8,
  259. 0x0f, 0xb1, 0x51, 0xaf, 0xae, 0x1e, 0x80, 0x04, 0x67, 0x88, 0xd0, 0xf9, 0x22, 0xad, 0x02, 0x8b,
  260. 0xf0, 0x31, 0x9e, 0x35, 0x16, 0x9e, 0x20, 0x9d, 0xf4, 0xc7, 0x3c, 0xf3, 0x98, 0xe7, 0x15, 0xdb,
  261. 0x86, 0xd1, 0x4f, 0x04, 0xf1, 0x4d, 0x5e, 0x58, 0x65, 0xf0, 0x1c, 0x92, 0x82, 0x21, 0xbc, 0x77,
  262. 0x3a, 0xd9, 0x6d, 0xfe, 0x6d, 0xe9, 0x44, 0xd3, 0x82, 0x87, 0x00, 0xf5, 0x90, 0x73, 0x32, 0xf5,
  263. 0x2e, 0x02, 0x55, 0x52, 0x2b, 0x8f, 0xc6, 0x6d, 0x62, 0x08, 0xc9, 0xb2, 0x54, 0xef, 0x95, 0xb4,
  264. 0x6f, 0xcc, 0xd6, 0xe4, 0x38, 0x85, 0xf8, 0xc5, 0x5b, 0x3a, 0xbc, 0xb6, 0xb3, 0x39, 0x68, 0x6c,
  265. 0x02, 0x09, 0x3f, 0xd7, 0xda, 0x9a, 0x8d, 0xe0, 0xd6, 0xe1, 0x25, 0xa4, 0x7f, 0x64, 0x77, 0xb0,
  266. 0xf6, 0x4a, 0x6d, 0x78, 0x47, 0x75, 0x58, 0xef, 0xed, 0x43, 0x16, 0x6b, 0xbe, 0x98, 0x08, 0xc9,
  267. 0x55, 0xeb, 0x22, 0x7a, 0x8e, 0xfd, 0xe1, 0xa7, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x07, 0x5f,
  268. 0x60, 0xca, 0x08, 0x02, 0x00, 0x00,
  269. }