struct.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. // Code generated by protoc-gen-go.
  2. // source: github.com/golang/protobuf/ptypes/struct/struct.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package structpb is a generated protocol buffer package.
  6. It is generated from these files:
  7. github.com/golang/protobuf/ptypes/struct/struct.proto
  8. It has these top-level messages:
  9. Struct
  10. Value
  11. ListValue
  12. */
  13. package structpb
  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. const _ = proto.ProtoPackageIsVersion1
  24. // `NullValue` is a singleton enumeration to represent the null value for the
  25. // `Value` type union.
  26. //
  27. // The JSON representation for `NullValue` is JSON `null`.
  28. type NullValue int32
  29. const (
  30. // Null value.
  31. NullValue_NULL_VALUE NullValue = 0
  32. )
  33. var NullValue_name = map[int32]string{
  34. 0: "NULL_VALUE",
  35. }
  36. var NullValue_value = map[string]int32{
  37. "NULL_VALUE": 0,
  38. }
  39. func (x NullValue) String() string {
  40. return proto.EnumName(NullValue_name, int32(x))
  41. }
  42. func (NullValue) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  43. func (NullValue) XXX_WellKnownType() string { return "NullValue" }
  44. // `Struct` represents a structured data value, consisting of fields
  45. // which map to dynamically typed values. In some languages, `Struct`
  46. // might be supported by a native representation. For example, in
  47. // scripting languages like JS a struct is represented as an
  48. // object. The details of that representation are described together
  49. // with the proto support for the language.
  50. //
  51. // The JSON representation for `Struct` is JSON object.
  52. type Struct struct {
  53. // Map of dynamically typed values.
  54. 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"`
  55. }
  56. func (m *Struct) Reset() { *m = Struct{} }
  57. func (m *Struct) String() string { return proto.CompactTextString(m) }
  58. func (*Struct) ProtoMessage() {}
  59. func (*Struct) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  60. func (*Struct) XXX_WellKnownType() string { return "Struct" }
  61. func (m *Struct) GetFields() map[string]*Value {
  62. if m != nil {
  63. return m.Fields
  64. }
  65. return nil
  66. }
  67. // `Value` represents a dynamically typed value which can be either
  68. // null, a number, a string, a boolean, a recursive struct value, or a
  69. // list of values. A producer of value is expected to set one of that
  70. // variants, absence of any variant indicates an error.
  71. //
  72. // The JSON representation for `Value` is JSON value.
  73. type Value struct {
  74. // The kind of value.
  75. //
  76. // Types that are valid to be assigned to Kind:
  77. // *Value_NullValue
  78. // *Value_NumberValue
  79. // *Value_StringValue
  80. // *Value_BoolValue
  81. // *Value_StructValue
  82. // *Value_ListValue
  83. Kind isValue_Kind `protobuf_oneof:"kind"`
  84. }
  85. func (m *Value) Reset() { *m = Value{} }
  86. func (m *Value) String() string { return proto.CompactTextString(m) }
  87. func (*Value) ProtoMessage() {}
  88. func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  89. func (*Value) XXX_WellKnownType() string { return "Value" }
  90. type isValue_Kind interface {
  91. isValue_Kind()
  92. }
  93. type Value_NullValue struct {
  94. NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"`
  95. }
  96. type Value_NumberValue struct {
  97. NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"`
  98. }
  99. type Value_StringValue struct {
  100. StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"`
  101. }
  102. type Value_BoolValue struct {
  103. BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"`
  104. }
  105. type Value_StructValue struct {
  106. StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"`
  107. }
  108. type Value_ListValue struct {
  109. ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"`
  110. }
  111. func (*Value_NullValue) isValue_Kind() {}
  112. func (*Value_NumberValue) isValue_Kind() {}
  113. func (*Value_StringValue) isValue_Kind() {}
  114. func (*Value_BoolValue) isValue_Kind() {}
  115. func (*Value_StructValue) isValue_Kind() {}
  116. func (*Value_ListValue) isValue_Kind() {}
  117. func (m *Value) GetKind() isValue_Kind {
  118. if m != nil {
  119. return m.Kind
  120. }
  121. return nil
  122. }
  123. func (m *Value) GetNullValue() NullValue {
  124. if x, ok := m.GetKind().(*Value_NullValue); ok {
  125. return x.NullValue
  126. }
  127. return NullValue_NULL_VALUE
  128. }
  129. func (m *Value) GetNumberValue() float64 {
  130. if x, ok := m.GetKind().(*Value_NumberValue); ok {
  131. return x.NumberValue
  132. }
  133. return 0
  134. }
  135. func (m *Value) GetStringValue() string {
  136. if x, ok := m.GetKind().(*Value_StringValue); ok {
  137. return x.StringValue
  138. }
  139. return ""
  140. }
  141. func (m *Value) GetBoolValue() bool {
  142. if x, ok := m.GetKind().(*Value_BoolValue); ok {
  143. return x.BoolValue
  144. }
  145. return false
  146. }
  147. func (m *Value) GetStructValue() *Struct {
  148. if x, ok := m.GetKind().(*Value_StructValue); ok {
  149. return x.StructValue
  150. }
  151. return nil
  152. }
  153. func (m *Value) GetListValue() *ListValue {
  154. if x, ok := m.GetKind().(*Value_ListValue); ok {
  155. return x.ListValue
  156. }
  157. return nil
  158. }
  159. // XXX_OneofFuncs is for the internal use of the proto package.
  160. 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{}) {
  161. return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
  162. (*Value_NullValue)(nil),
  163. (*Value_NumberValue)(nil),
  164. (*Value_StringValue)(nil),
  165. (*Value_BoolValue)(nil),
  166. (*Value_StructValue)(nil),
  167. (*Value_ListValue)(nil),
  168. }
  169. }
  170. func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  171. m := msg.(*Value)
  172. // kind
  173. switch x := m.Kind.(type) {
  174. case *Value_NullValue:
  175. b.EncodeVarint(1<<3 | proto.WireVarint)
  176. b.EncodeVarint(uint64(x.NullValue))
  177. case *Value_NumberValue:
  178. b.EncodeVarint(2<<3 | proto.WireFixed64)
  179. b.EncodeFixed64(math.Float64bits(x.NumberValue))
  180. case *Value_StringValue:
  181. b.EncodeVarint(3<<3 | proto.WireBytes)
  182. b.EncodeStringBytes(x.StringValue)
  183. case *Value_BoolValue:
  184. t := uint64(0)
  185. if x.BoolValue {
  186. t = 1
  187. }
  188. b.EncodeVarint(4<<3 | proto.WireVarint)
  189. b.EncodeVarint(t)
  190. case *Value_StructValue:
  191. b.EncodeVarint(5<<3 | proto.WireBytes)
  192. if err := b.EncodeMessage(x.StructValue); err != nil {
  193. return err
  194. }
  195. case *Value_ListValue:
  196. b.EncodeVarint(6<<3 | proto.WireBytes)
  197. if err := b.EncodeMessage(x.ListValue); err != nil {
  198. return err
  199. }
  200. case nil:
  201. default:
  202. return fmt.Errorf("Value.Kind has unexpected type %T", x)
  203. }
  204. return nil
  205. }
  206. func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  207. m := msg.(*Value)
  208. switch tag {
  209. case 1: // kind.null_value
  210. if wire != proto.WireVarint {
  211. return true, proto.ErrInternalBadWireType
  212. }
  213. x, err := b.DecodeVarint()
  214. m.Kind = &Value_NullValue{NullValue(x)}
  215. return true, err
  216. case 2: // kind.number_value
  217. if wire != proto.WireFixed64 {
  218. return true, proto.ErrInternalBadWireType
  219. }
  220. x, err := b.DecodeFixed64()
  221. m.Kind = &Value_NumberValue{math.Float64frombits(x)}
  222. return true, err
  223. case 3: // kind.string_value
  224. if wire != proto.WireBytes {
  225. return true, proto.ErrInternalBadWireType
  226. }
  227. x, err := b.DecodeStringBytes()
  228. m.Kind = &Value_StringValue{x}
  229. return true, err
  230. case 4: // kind.bool_value
  231. if wire != proto.WireVarint {
  232. return true, proto.ErrInternalBadWireType
  233. }
  234. x, err := b.DecodeVarint()
  235. m.Kind = &Value_BoolValue{x != 0}
  236. return true, err
  237. case 5: // kind.struct_value
  238. if wire != proto.WireBytes {
  239. return true, proto.ErrInternalBadWireType
  240. }
  241. msg := new(Struct)
  242. err := b.DecodeMessage(msg)
  243. m.Kind = &Value_StructValue{msg}
  244. return true, err
  245. case 6: // kind.list_value
  246. if wire != proto.WireBytes {
  247. return true, proto.ErrInternalBadWireType
  248. }
  249. msg := new(ListValue)
  250. err := b.DecodeMessage(msg)
  251. m.Kind = &Value_ListValue{msg}
  252. return true, err
  253. default:
  254. return false, nil
  255. }
  256. }
  257. func _Value_OneofSizer(msg proto.Message) (n int) {
  258. m := msg.(*Value)
  259. // kind
  260. switch x := m.Kind.(type) {
  261. case *Value_NullValue:
  262. n += proto.SizeVarint(1<<3 | proto.WireVarint)
  263. n += proto.SizeVarint(uint64(x.NullValue))
  264. case *Value_NumberValue:
  265. n += proto.SizeVarint(2<<3 | proto.WireFixed64)
  266. n += 8
  267. case *Value_StringValue:
  268. n += proto.SizeVarint(3<<3 | proto.WireBytes)
  269. n += proto.SizeVarint(uint64(len(x.StringValue)))
  270. n += len(x.StringValue)
  271. case *Value_BoolValue:
  272. n += proto.SizeVarint(4<<3 | proto.WireVarint)
  273. n += 1
  274. case *Value_StructValue:
  275. s := proto.Size(x.StructValue)
  276. n += proto.SizeVarint(5<<3 | proto.WireBytes)
  277. n += proto.SizeVarint(uint64(s))
  278. n += s
  279. case *Value_ListValue:
  280. s := proto.Size(x.ListValue)
  281. n += proto.SizeVarint(6<<3 | proto.WireBytes)
  282. n += proto.SizeVarint(uint64(s))
  283. n += s
  284. case nil:
  285. default:
  286. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  287. }
  288. return n
  289. }
  290. // `ListValue` is a wrapper around a repeated field of values.
  291. //
  292. // The JSON representation for `ListValue` is JSON array.
  293. type ListValue struct {
  294. // Repeated field of dynamically typed values.
  295. Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
  296. }
  297. func (m *ListValue) Reset() { *m = ListValue{} }
  298. func (m *ListValue) String() string { return proto.CompactTextString(m) }
  299. func (*ListValue) ProtoMessage() {}
  300. func (*ListValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  301. func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
  302. func (m *ListValue) GetValues() []*Value {
  303. if m != nil {
  304. return m.Values
  305. }
  306. return nil
  307. }
  308. func init() {
  309. proto.RegisterType((*Struct)(nil), "google.protobuf.Struct")
  310. proto.RegisterType((*Value)(nil), "google.protobuf.Value")
  311. proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue")
  312. proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
  313. }
  314. var fileDescriptor0 = []byte{
  315. // 412 bytes of a gzipped FileDescriptorProto
  316. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x8b, 0xd3, 0x40,
  317. 0x14, 0xc7, 0x3b, 0x49, 0x1b, 0xcc, 0x8b, 0xd4, 0x12, 0x41, 0x4b, 0x05, 0x95, 0xf6, 0x52, 0x44,
  318. 0x12, 0xac, 0x08, 0x62, 0xbd, 0x18, 0xa8, 0x15, 0x0c, 0x25, 0x46, 0x5b, 0xc1, 0x4b, 0x69, 0xda,
  319. 0x34, 0x86, 0x4e, 0x67, 0x42, 0x7e, 0x28, 0x3d, 0xfa, 0x5f, 0x78, 0x5c, 0xf6, 0xb8, 0xc7, 0xfd,
  320. 0x0b, 0x77, 0x7e, 0x24, 0xd9, 0xa5, 0xa5, 0xb0, 0xa7, 0x99, 0xf7, 0x9d, 0xcf, 0xfb, 0xce, 0x7b,
  321. 0x6f, 0x06, 0xde, 0x45, 0x71, 0xfe, 0xbb, 0x08, 0xac, 0x35, 0xdd, 0xdb, 0x11, 0xc5, 0x2b, 0x12,
  322. 0xd9, 0x49, 0x4a, 0x73, 0x1a, 0x14, 0x5b, 0x3b, 0xc9, 0x0f, 0x49, 0x98, 0xd9, 0x59, 0x9e, 0x16,
  323. 0xeb, 0xbc, 0x5c, 0x2c, 0x71, 0x6a, 0x3e, 0x8a, 0x28, 0x8d, 0x70, 0x68, 0x55, 0x6c, 0xff, 0x3f,
  324. 0x02, 0xed, 0xbb, 0x20, 0xcc, 0x31, 0x68, 0xdb, 0x38, 0xc4, 0x9b, 0xac, 0x8b, 0x5e, 0xaa, 0x43,
  325. 0x63, 0x34, 0xb0, 0x8e, 0x60, 0x4b, 0x82, 0xd6, 0x67, 0x41, 0x4d, 0x48, 0x9e, 0x1e, 0xfc, 0x32,
  326. 0xa5, 0xf7, 0x0d, 0x8c, 0x3b, 0xb2, 0xd9, 0x01, 0x75, 0x17, 0x1e, 0x98, 0x11, 0x1a, 0xea, 0x3e,
  327. 0xdf, 0x9a, 0xaf, 0xa1, 0xf5, 0x67, 0x85, 0x8b, 0xb0, 0xab, 0x30, 0xcd, 0x18, 0x3d, 0x39, 0x31,
  328. 0x5f, 0xf0, 0x53, 0x5f, 0x42, 0x1f, 0x94, 0xf7, 0xa8, 0x7f, 0xad, 0x40, 0x4b, 0x88, 0xac, 0x32,
  329. 0x20, 0x05, 0xc6, 0x4b, 0x69, 0xc0, 0x4d, 0xdb, 0xa3, 0xde, 0x89, 0xc1, 0x8c, 0x21, 0x82, 0xff,
  330. 0xd2, 0xf0, 0x75, 0x52, 0x05, 0xe6, 0x00, 0x1e, 0x92, 0x62, 0x1f, 0x84, 0xe9, 0xf2, 0xf6, 0x7e,
  331. 0xc4, 0x10, 0x43, 0xaa, 0x35, 0xc4, 0xe6, 0x14, 0x93, 0xa8, 0x84, 0x54, 0x5e, 0x38, 0x87, 0xa4,
  332. 0x2a, 0xa1, 0x17, 0x00, 0x01, 0xa5, 0x55, 0x19, 0x4d, 0x86, 0x3c, 0xe0, 0x57, 0x71, 0x4d, 0x02,
  333. 0x1f, 0x85, 0x0b, 0x1b, 0x51, 0x89, 0xb4, 0x44, 0xab, 0x4f, 0xcf, 0xcc, 0xb1, 0xb4, 0x67, 0xbb,
  334. 0xba, 0x4b, 0x1c, 0x67, 0x55, 0xae, 0x26, 0x72, 0x4f, 0xbb, 0x74, 0x19, 0x52, 0x77, 0x89, 0xab,
  335. 0xc0, 0xd1, 0xa0, 0xb9, 0x8b, 0xc9, 0xa6, 0x3f, 0x06, 0xbd, 0x26, 0x4c, 0x0b, 0x34, 0x61, 0x56,
  336. 0xbd, 0xe8, 0xb9, 0xa1, 0x97, 0xd4, 0xab, 0x67, 0xa0, 0xd7, 0x43, 0x34, 0xdb, 0x00, 0xb3, 0xb9,
  337. 0xeb, 0x2e, 0x17, 0x9f, 0xdc, 0xf9, 0xa4, 0xd3, 0x70, 0xfe, 0x21, 0x78, 0xcc, 0x7e, 0xdb, 0xb1,
  338. 0x85, 0x63, 0xc8, 0x6e, 0x3c, 0x1e, 0x7b, 0xe8, 0xd7, 0x9b, 0xfb, 0x7e, 0xcc, 0xb1, 0x5c, 0x92,
  339. 0xe0, 0x02, 0xa1, 0x4b, 0x45, 0x9d, 0x7a, 0xce, 0x95, 0xf2, 0x7c, 0x2a, 0xcd, 0xbd, 0xaa, 0xbe,
  340. 0x9f, 0x21, 0xc6, 0x5f, 0x09, 0xfd, 0x4b, 0x7e, 0xf0, 0xcc, 0x40, 0x13, 0x56, 0x6f, 0x6f, 0x02,
  341. 0x00, 0x00, 0xff, 0xff, 0xbc, 0xcf, 0x6d, 0x50, 0xfe, 0x02, 0x00, 0x00,
  342. }