struct.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/protobuf/struct.proto
  3. package structpb // import "github.com/golang/protobuf/ptypes/struct"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. // `NullValue` is a singleton enumeration to represent the null value for the
  17. // `Value` type union.
  18. //
  19. // The JSON representation for `NullValue` is JSON `null`.
  20. type NullValue int32
  21. const (
  22. // Null value.
  23. NullValue_NULL_VALUE NullValue = 0
  24. )
  25. var NullValue_name = map[int32]string{
  26. 0: "NULL_VALUE",
  27. }
  28. var NullValue_value = map[string]int32{
  29. "NULL_VALUE": 0,
  30. }
  31. func (x NullValue) String() string {
  32. return proto.EnumName(NullValue_name, int32(x))
  33. }
  34. func (NullValue) EnumDescriptor() ([]byte, []int) {
  35. return fileDescriptor_struct_3a5a94e0c7801b27, []int{0}
  36. }
  37. func (NullValue) XXX_WellKnownType() string { return "NullValue" }
  38. // `Struct` represents a structured data value, consisting of fields
  39. // which map to dynamically typed values. In some languages, `Struct`
  40. // might be supported by a native representation. For example, in
  41. // scripting languages like JS a struct is represented as an
  42. // object. The details of that representation are described together
  43. // with the proto support for the language.
  44. //
  45. // The JSON representation for `Struct` is JSON object.
  46. type Struct struct {
  47. // Unordered map of dynamically typed values.
  48. Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  49. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  50. XXX_unrecognized []byte `json:"-"`
  51. XXX_sizecache int32 `json:"-"`
  52. }
  53. func (m *Struct) Reset() { *m = Struct{} }
  54. func (m *Struct) String() string { return proto.CompactTextString(m) }
  55. func (*Struct) ProtoMessage() {}
  56. func (*Struct) Descriptor() ([]byte, []int) {
  57. return fileDescriptor_struct_3a5a94e0c7801b27, []int{0}
  58. }
  59. func (*Struct) XXX_WellKnownType() string { return "Struct" }
  60. func (m *Struct) XXX_Unmarshal(b []byte) error {
  61. return xxx_messageInfo_Struct.Unmarshal(m, b)
  62. }
  63. func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  64. return xxx_messageInfo_Struct.Marshal(b, m, deterministic)
  65. }
  66. func (dst *Struct) XXX_Merge(src proto.Message) {
  67. xxx_messageInfo_Struct.Merge(dst, src)
  68. }
  69. func (m *Struct) XXX_Size() int {
  70. return xxx_messageInfo_Struct.Size(m)
  71. }
  72. func (m *Struct) XXX_DiscardUnknown() {
  73. xxx_messageInfo_Struct.DiscardUnknown(m)
  74. }
  75. var xxx_messageInfo_Struct proto.InternalMessageInfo
  76. func (m *Struct) GetFields() map[string]*Value {
  77. if m != nil {
  78. return m.Fields
  79. }
  80. return nil
  81. }
  82. // `Value` represents a dynamically typed value which can be either
  83. // null, a number, a string, a boolean, a recursive struct value, or a
  84. // list of values. A producer of value is expected to set one of that
  85. // variants, absence of any variant indicates an error.
  86. //
  87. // The JSON representation for `Value` is JSON value.
  88. type Value struct {
  89. // The kind of value.
  90. //
  91. // Types that are valid to be assigned to Kind:
  92. // *Value_NullValue
  93. // *Value_NumberValue
  94. // *Value_StringValue
  95. // *Value_BoolValue
  96. // *Value_StructValue
  97. // *Value_ListValue
  98. Kind isValue_Kind `protobuf_oneof:"kind"`
  99. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  100. XXX_unrecognized []byte `json:"-"`
  101. XXX_sizecache int32 `json:"-"`
  102. }
  103. func (m *Value) Reset() { *m = Value{} }
  104. func (m *Value) String() string { return proto.CompactTextString(m) }
  105. func (*Value) ProtoMessage() {}
  106. func (*Value) Descriptor() ([]byte, []int) {
  107. return fileDescriptor_struct_3a5a94e0c7801b27, []int{1}
  108. }
  109. func (*Value) XXX_WellKnownType() string { return "Value" }
  110. func (m *Value) XXX_Unmarshal(b []byte) error {
  111. return xxx_messageInfo_Value.Unmarshal(m, b)
  112. }
  113. func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  114. return xxx_messageInfo_Value.Marshal(b, m, deterministic)
  115. }
  116. func (dst *Value) XXX_Merge(src proto.Message) {
  117. xxx_messageInfo_Value.Merge(dst, src)
  118. }
  119. func (m *Value) XXX_Size() int {
  120. return xxx_messageInfo_Value.Size(m)
  121. }
  122. func (m *Value) XXX_DiscardUnknown() {
  123. xxx_messageInfo_Value.DiscardUnknown(m)
  124. }
  125. var xxx_messageInfo_Value proto.InternalMessageInfo
  126. type isValue_Kind interface {
  127. isValue_Kind()
  128. }
  129. type Value_NullValue struct {
  130. NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"`
  131. }
  132. type Value_NumberValue struct {
  133. NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"`
  134. }
  135. type Value_StringValue struct {
  136. StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"`
  137. }
  138. type Value_BoolValue struct {
  139. BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"`
  140. }
  141. type Value_StructValue struct {
  142. StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"`
  143. }
  144. type Value_ListValue struct {
  145. ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"`
  146. }
  147. func (*Value_NullValue) isValue_Kind() {}
  148. func (*Value_NumberValue) isValue_Kind() {}
  149. func (*Value_StringValue) isValue_Kind() {}
  150. func (*Value_BoolValue) isValue_Kind() {}
  151. func (*Value_StructValue) isValue_Kind() {}
  152. func (*Value_ListValue) isValue_Kind() {}
  153. func (m *Value) GetKind() isValue_Kind {
  154. if m != nil {
  155. return m.Kind
  156. }
  157. return nil
  158. }
  159. func (m *Value) GetNullValue() NullValue {
  160. if x, ok := m.GetKind().(*Value_NullValue); ok {
  161. return x.NullValue
  162. }
  163. return NullValue_NULL_VALUE
  164. }
  165. func (m *Value) GetNumberValue() float64 {
  166. if x, ok := m.GetKind().(*Value_NumberValue); ok {
  167. return x.NumberValue
  168. }
  169. return 0
  170. }
  171. func (m *Value) GetStringValue() string {
  172. if x, ok := m.GetKind().(*Value_StringValue); ok {
  173. return x.StringValue
  174. }
  175. return ""
  176. }
  177. func (m *Value) GetBoolValue() bool {
  178. if x, ok := m.GetKind().(*Value_BoolValue); ok {
  179. return x.BoolValue
  180. }
  181. return false
  182. }
  183. func (m *Value) GetStructValue() *Struct {
  184. if x, ok := m.GetKind().(*Value_StructValue); ok {
  185. return x.StructValue
  186. }
  187. return nil
  188. }
  189. func (m *Value) GetListValue() *ListValue {
  190. if x, ok := m.GetKind().(*Value_ListValue); ok {
  191. return x.ListValue
  192. }
  193. return nil
  194. }
  195. // XXX_OneofFuncs is for the internal use of the proto package.
  196. func (*Value) 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{}) {
  197. return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
  198. (*Value_NullValue)(nil),
  199. (*Value_NumberValue)(nil),
  200. (*Value_StringValue)(nil),
  201. (*Value_BoolValue)(nil),
  202. (*Value_StructValue)(nil),
  203. (*Value_ListValue)(nil),
  204. }
  205. }
  206. func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  207. m := msg.(*Value)
  208. // kind
  209. switch x := m.Kind.(type) {
  210. case *Value_NullValue:
  211. b.EncodeVarint(1<<3 | proto.WireVarint)
  212. b.EncodeVarint(uint64(x.NullValue))
  213. case *Value_NumberValue:
  214. b.EncodeVarint(2<<3 | proto.WireFixed64)
  215. b.EncodeFixed64(math.Float64bits(x.NumberValue))
  216. case *Value_StringValue:
  217. b.EncodeVarint(3<<3 | proto.WireBytes)
  218. b.EncodeStringBytes(x.StringValue)
  219. case *Value_BoolValue:
  220. t := uint64(0)
  221. if x.BoolValue {
  222. t = 1
  223. }
  224. b.EncodeVarint(4<<3 | proto.WireVarint)
  225. b.EncodeVarint(t)
  226. case *Value_StructValue:
  227. b.EncodeVarint(5<<3 | proto.WireBytes)
  228. if err := b.EncodeMessage(x.StructValue); err != nil {
  229. return err
  230. }
  231. case *Value_ListValue:
  232. b.EncodeVarint(6<<3 | proto.WireBytes)
  233. if err := b.EncodeMessage(x.ListValue); err != nil {
  234. return err
  235. }
  236. case nil:
  237. default:
  238. return fmt.Errorf("Value.Kind has unexpected type %T", x)
  239. }
  240. return nil
  241. }
  242. func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  243. m := msg.(*Value)
  244. switch tag {
  245. case 1: // kind.null_value
  246. if wire != proto.WireVarint {
  247. return true, proto.ErrInternalBadWireType
  248. }
  249. x, err := b.DecodeVarint()
  250. m.Kind = &Value_NullValue{NullValue(x)}
  251. return true, err
  252. case 2: // kind.number_value
  253. if wire != proto.WireFixed64 {
  254. return true, proto.ErrInternalBadWireType
  255. }
  256. x, err := b.DecodeFixed64()
  257. m.Kind = &Value_NumberValue{math.Float64frombits(x)}
  258. return true, err
  259. case 3: // kind.string_value
  260. if wire != proto.WireBytes {
  261. return true, proto.ErrInternalBadWireType
  262. }
  263. x, err := b.DecodeStringBytes()
  264. m.Kind = &Value_StringValue{x}
  265. return true, err
  266. case 4: // kind.bool_value
  267. if wire != proto.WireVarint {
  268. return true, proto.ErrInternalBadWireType
  269. }
  270. x, err := b.DecodeVarint()
  271. m.Kind = &Value_BoolValue{x != 0}
  272. return true, err
  273. case 5: // kind.struct_value
  274. if wire != proto.WireBytes {
  275. return true, proto.ErrInternalBadWireType
  276. }
  277. msg := new(Struct)
  278. err := b.DecodeMessage(msg)
  279. m.Kind = &Value_StructValue{msg}
  280. return true, err
  281. case 6: // kind.list_value
  282. if wire != proto.WireBytes {
  283. return true, proto.ErrInternalBadWireType
  284. }
  285. msg := new(ListValue)
  286. err := b.DecodeMessage(msg)
  287. m.Kind = &Value_ListValue{msg}
  288. return true, err
  289. default:
  290. return false, nil
  291. }
  292. }
  293. func _Value_OneofSizer(msg proto.Message) (n int) {
  294. m := msg.(*Value)
  295. // kind
  296. switch x := m.Kind.(type) {
  297. case *Value_NullValue:
  298. n += 1 // tag and wire
  299. n += proto.SizeVarint(uint64(x.NullValue))
  300. case *Value_NumberValue:
  301. n += 1 // tag and wire
  302. n += 8
  303. case *Value_StringValue:
  304. n += 1 // tag and wire
  305. n += proto.SizeVarint(uint64(len(x.StringValue)))
  306. n += len(x.StringValue)
  307. case *Value_BoolValue:
  308. n += 1 // tag and wire
  309. n += 1
  310. case *Value_StructValue:
  311. s := proto.Size(x.StructValue)
  312. n += 1 // tag and wire
  313. n += proto.SizeVarint(uint64(s))
  314. n += s
  315. case *Value_ListValue:
  316. s := proto.Size(x.ListValue)
  317. n += 1 // tag and wire
  318. n += proto.SizeVarint(uint64(s))
  319. n += s
  320. case nil:
  321. default:
  322. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  323. }
  324. return n
  325. }
  326. // `ListValue` is a wrapper around a repeated field of values.
  327. //
  328. // The JSON representation for `ListValue` is JSON array.
  329. type ListValue struct {
  330. // Repeated field of dynamically typed values.
  331. Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
  332. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  333. XXX_unrecognized []byte `json:"-"`
  334. XXX_sizecache int32 `json:"-"`
  335. }
  336. func (m *ListValue) Reset() { *m = ListValue{} }
  337. func (m *ListValue) String() string { return proto.CompactTextString(m) }
  338. func (*ListValue) ProtoMessage() {}
  339. func (*ListValue) Descriptor() ([]byte, []int) {
  340. return fileDescriptor_struct_3a5a94e0c7801b27, []int{2}
  341. }
  342. func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
  343. func (m *ListValue) XXX_Unmarshal(b []byte) error {
  344. return xxx_messageInfo_ListValue.Unmarshal(m, b)
  345. }
  346. func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  347. return xxx_messageInfo_ListValue.Marshal(b, m, deterministic)
  348. }
  349. func (dst *ListValue) XXX_Merge(src proto.Message) {
  350. xxx_messageInfo_ListValue.Merge(dst, src)
  351. }
  352. func (m *ListValue) XXX_Size() int {
  353. return xxx_messageInfo_ListValue.Size(m)
  354. }
  355. func (m *ListValue) XXX_DiscardUnknown() {
  356. xxx_messageInfo_ListValue.DiscardUnknown(m)
  357. }
  358. var xxx_messageInfo_ListValue proto.InternalMessageInfo
  359. func (m *ListValue) GetValues() []*Value {
  360. if m != nil {
  361. return m.Values
  362. }
  363. return nil
  364. }
  365. func init() {
  366. proto.RegisterType((*Struct)(nil), "google.protobuf.Struct")
  367. proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry")
  368. proto.RegisterType((*Value)(nil), "google.protobuf.Value")
  369. proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue")
  370. proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
  371. }
  372. func init() {
  373. proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_struct_3a5a94e0c7801b27)
  374. }
  375. var fileDescriptor_struct_3a5a94e0c7801b27 = []byte{
  376. // 417 bytes of a gzipped FileDescriptorProto
  377. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40,
  378. 0x14, 0xc7, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa2, 0xa1, 0x7b, 0x09,
  379. 0x22, 0x29, 0xd6, 0x8b, 0x18, 0x2f, 0x06, 0xd6, 0x5d, 0x30, 0x2c, 0x31, 0xba, 0x15, 0xbc, 0x94,
  380. 0x26, 0x4d, 0x63, 0xe8, 0x74, 0x26, 0x24, 0x33, 0x4a, 0x8f, 0x7e, 0x0b, 0xcf, 0x1e, 0x3d, 0xfa,
  381. 0xe9, 0x3c, 0xca, 0xcc, 0x24, 0xa9, 0xb4, 0xf4, 0x94, 0xbc, 0xf7, 0x7e, 0xef, 0x3f, 0xef, 0xff,
  382. 0x66, 0xe0, 0x71, 0xc1, 0x58, 0x41, 0xf2, 0x49, 0x55, 0x33, 0xce, 0x52, 0xb1, 0x9a, 0x34, 0xbc,
  383. 0x16, 0x19, 0xf7, 0x55, 0x8c, 0xef, 0xe9, 0xaa, 0xdf, 0x55, 0xc7, 0x3f, 0x11, 0x58, 0x1f, 0x15,
  384. 0x81, 0x03, 0xb0, 0x56, 0x65, 0x4e, 0x96, 0xcd, 0x08, 0xb9, 0xa6, 0xe7, 0x4c, 0x2f, 0xfc, 0x3d,
  385. 0xd8, 0xd7, 0xa0, 0xff, 0x4e, 0x51, 0x97, 0x94, 0xd7, 0xdb, 0xa4, 0x6d, 0x39, 0xff, 0x00, 0xce,
  386. 0x7f, 0x69, 0x7c, 0x06, 0xe6, 0x3a, 0xdf, 0x8e, 0x90, 0x8b, 0x3c, 0x3b, 0x91, 0xbf, 0xf8, 0x39,
  387. 0x0c, 0xbf, 0x2d, 0x88, 0xc8, 0x47, 0x86, 0x8b, 0x3c, 0x67, 0xfa, 0xe0, 0x40, 0x7c, 0x26, 0xab,
  388. 0x89, 0x86, 0x5e, 0x1b, 0xaf, 0xd0, 0xf8, 0x8f, 0x01, 0x43, 0x95, 0xc4, 0x01, 0x00, 0x15, 0x84,
  389. 0xcc, 0xb5, 0x80, 0x14, 0x3d, 0x9d, 0x9e, 0x1f, 0x08, 0xdc, 0x08, 0x42, 0x14, 0x7f, 0x3d, 0x48,
  390. 0x6c, 0xda, 0x05, 0xf8, 0x02, 0xee, 0x52, 0xb1, 0x49, 0xf3, 0x7a, 0xbe, 0x3b, 0x1f, 0x5d, 0x0f,
  391. 0x12, 0x47, 0x67, 0x7b, 0xa8, 0xe1, 0x75, 0x49, 0x8b, 0x16, 0x32, 0xe5, 0xe0, 0x12, 0xd2, 0x59,
  392. 0x0d, 0x3d, 0x05, 0x48, 0x19, 0xeb, 0xc6, 0x38, 0x71, 0x91, 0x77, 0x47, 0x1e, 0x25, 0x73, 0x1a,
  393. 0x78, 0xa3, 0x54, 0x44, 0xc6, 0x5b, 0x64, 0xa8, 0xac, 0x3e, 0x3c, 0xb2, 0xc7, 0x56, 0x5e, 0x64,
  394. 0xbc, 0x77, 0x49, 0xca, 0xa6, 0xeb, 0xb5, 0x54, 0xef, 0xa1, 0xcb, 0xa8, 0x6c, 0x78, 0xef, 0x92,
  395. 0x74, 0x41, 0x68, 0xc1, 0xc9, 0xba, 0xa4, 0xcb, 0x71, 0x00, 0x76, 0x4f, 0x60, 0x1f, 0x2c, 0x25,
  396. 0xd6, 0xdd, 0xe8, 0xb1, 0xa5, 0xb7, 0xd4, 0xb3, 0x47, 0x60, 0xf7, 0x4b, 0xc4, 0xa7, 0x00, 0x37,
  397. 0xb7, 0x51, 0x34, 0x9f, 0xbd, 0x8d, 0x6e, 0x2f, 0xcf, 0x06, 0xe1, 0x0f, 0x04, 0xf7, 0x33, 0xb6,
  398. 0xd9, 0x97, 0x08, 0x1d, 0xed, 0x26, 0x96, 0x71, 0x8c, 0xbe, 0xbc, 0x28, 0x4a, 0xfe, 0x55, 0xa4,
  399. 0x7e, 0xc6, 0x36, 0x93, 0x82, 0x91, 0x05, 0x2d, 0x76, 0x4f, 0xb1, 0xe2, 0xdb, 0x2a, 0x6f, 0xda,
  400. 0x17, 0x19, 0xe8, 0x4f, 0x95, 0xfe, 0x45, 0xe8, 0x97, 0x61, 0x5e, 0xc5, 0xe1, 0x6f, 0xe3, 0xc9,
  401. 0x95, 0x16, 0x8f, 0xbb, 0xf9, 0x3e, 0xe7, 0x84, 0xbc, 0xa7, 0xec, 0x3b, 0xfd, 0x24, 0x3b, 0x53,
  402. 0x4b, 0x49, 0xbd, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x1b, 0x59, 0xf8, 0xe5, 0x02, 0x00,
  403. 0x00,
  404. }