struct.pb.go 12 KB

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