struct.pb.go 13 KB

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