struct.pb.go 12 KB

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