struct.pb.go 13 KB

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