Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

438 lignes
15 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/spanner/v1/mutation.proto
  3. package spanner // import "google.golang.org/genproto/googleapis/spanner/v1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _struct "github.com/golang/protobuf/ptypes/struct"
  8. import _ "google.golang.org/genproto/googleapis/api/annotations"
  9. // Reference imports to suppress errors if they are not otherwise used.
  10. var _ = proto.Marshal
  11. var _ = fmt.Errorf
  12. var _ = math.Inf
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the proto package it is being compiled against.
  15. // A compilation error at this line likely means your copy of the
  16. // proto package needs to be updated.
  17. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  18. // A modification to one or more Cloud Spanner rows. Mutations can be
  19. // applied to a Cloud Spanner database by sending them in a
  20. // [Commit][google.spanner.v1.Spanner.Commit] call.
  21. type Mutation struct {
  22. // Required. The operation to perform.
  23. //
  24. // Types that are valid to be assigned to Operation:
  25. // *Mutation_Insert
  26. // *Mutation_Update
  27. // *Mutation_InsertOrUpdate
  28. // *Mutation_Replace
  29. // *Mutation_Delete_
  30. Operation isMutation_Operation `protobuf_oneof:"operation"`
  31. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  32. XXX_unrecognized []byte `json:"-"`
  33. XXX_sizecache int32 `json:"-"`
  34. }
  35. func (m *Mutation) Reset() { *m = Mutation{} }
  36. func (m *Mutation) String() string { return proto.CompactTextString(m) }
  37. func (*Mutation) ProtoMessage() {}
  38. func (*Mutation) Descriptor() ([]byte, []int) {
  39. return fileDescriptor_mutation_7ac3401eb5ab6104, []int{0}
  40. }
  41. func (m *Mutation) XXX_Unmarshal(b []byte) error {
  42. return xxx_messageInfo_Mutation.Unmarshal(m, b)
  43. }
  44. func (m *Mutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  45. return xxx_messageInfo_Mutation.Marshal(b, m, deterministic)
  46. }
  47. func (dst *Mutation) XXX_Merge(src proto.Message) {
  48. xxx_messageInfo_Mutation.Merge(dst, src)
  49. }
  50. func (m *Mutation) XXX_Size() int {
  51. return xxx_messageInfo_Mutation.Size(m)
  52. }
  53. func (m *Mutation) XXX_DiscardUnknown() {
  54. xxx_messageInfo_Mutation.DiscardUnknown(m)
  55. }
  56. var xxx_messageInfo_Mutation proto.InternalMessageInfo
  57. type isMutation_Operation interface {
  58. isMutation_Operation()
  59. }
  60. type Mutation_Insert struct {
  61. Insert *Mutation_Write `protobuf:"bytes,1,opt,name=insert,proto3,oneof"`
  62. }
  63. type Mutation_Update struct {
  64. Update *Mutation_Write `protobuf:"bytes,2,opt,name=update,proto3,oneof"`
  65. }
  66. type Mutation_InsertOrUpdate struct {
  67. InsertOrUpdate *Mutation_Write `protobuf:"bytes,3,opt,name=insert_or_update,json=insertOrUpdate,proto3,oneof"`
  68. }
  69. type Mutation_Replace struct {
  70. Replace *Mutation_Write `protobuf:"bytes,4,opt,name=replace,proto3,oneof"`
  71. }
  72. type Mutation_Delete_ struct {
  73. Delete *Mutation_Delete `protobuf:"bytes,5,opt,name=delete,proto3,oneof"`
  74. }
  75. func (*Mutation_Insert) isMutation_Operation() {}
  76. func (*Mutation_Update) isMutation_Operation() {}
  77. func (*Mutation_InsertOrUpdate) isMutation_Operation() {}
  78. func (*Mutation_Replace) isMutation_Operation() {}
  79. func (*Mutation_Delete_) isMutation_Operation() {}
  80. func (m *Mutation) GetOperation() isMutation_Operation {
  81. if m != nil {
  82. return m.Operation
  83. }
  84. return nil
  85. }
  86. func (m *Mutation) GetInsert() *Mutation_Write {
  87. if x, ok := m.GetOperation().(*Mutation_Insert); ok {
  88. return x.Insert
  89. }
  90. return nil
  91. }
  92. func (m *Mutation) GetUpdate() *Mutation_Write {
  93. if x, ok := m.GetOperation().(*Mutation_Update); ok {
  94. return x.Update
  95. }
  96. return nil
  97. }
  98. func (m *Mutation) GetInsertOrUpdate() *Mutation_Write {
  99. if x, ok := m.GetOperation().(*Mutation_InsertOrUpdate); ok {
  100. return x.InsertOrUpdate
  101. }
  102. return nil
  103. }
  104. func (m *Mutation) GetReplace() *Mutation_Write {
  105. if x, ok := m.GetOperation().(*Mutation_Replace); ok {
  106. return x.Replace
  107. }
  108. return nil
  109. }
  110. func (m *Mutation) GetDelete() *Mutation_Delete {
  111. if x, ok := m.GetOperation().(*Mutation_Delete_); ok {
  112. return x.Delete
  113. }
  114. return nil
  115. }
  116. // XXX_OneofFuncs is for the internal use of the proto package.
  117. func (*Mutation) 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{}) {
  118. return _Mutation_OneofMarshaler, _Mutation_OneofUnmarshaler, _Mutation_OneofSizer, []interface{}{
  119. (*Mutation_Insert)(nil),
  120. (*Mutation_Update)(nil),
  121. (*Mutation_InsertOrUpdate)(nil),
  122. (*Mutation_Replace)(nil),
  123. (*Mutation_Delete_)(nil),
  124. }
  125. }
  126. func _Mutation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  127. m := msg.(*Mutation)
  128. // operation
  129. switch x := m.Operation.(type) {
  130. case *Mutation_Insert:
  131. b.EncodeVarint(1<<3 | proto.WireBytes)
  132. if err := b.EncodeMessage(x.Insert); err != nil {
  133. return err
  134. }
  135. case *Mutation_Update:
  136. b.EncodeVarint(2<<3 | proto.WireBytes)
  137. if err := b.EncodeMessage(x.Update); err != nil {
  138. return err
  139. }
  140. case *Mutation_InsertOrUpdate:
  141. b.EncodeVarint(3<<3 | proto.WireBytes)
  142. if err := b.EncodeMessage(x.InsertOrUpdate); err != nil {
  143. return err
  144. }
  145. case *Mutation_Replace:
  146. b.EncodeVarint(4<<3 | proto.WireBytes)
  147. if err := b.EncodeMessage(x.Replace); err != nil {
  148. return err
  149. }
  150. case *Mutation_Delete_:
  151. b.EncodeVarint(5<<3 | proto.WireBytes)
  152. if err := b.EncodeMessage(x.Delete); err != nil {
  153. return err
  154. }
  155. case nil:
  156. default:
  157. return fmt.Errorf("Mutation.Operation has unexpected type %T", x)
  158. }
  159. return nil
  160. }
  161. func _Mutation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  162. m := msg.(*Mutation)
  163. switch tag {
  164. case 1: // operation.insert
  165. if wire != proto.WireBytes {
  166. return true, proto.ErrInternalBadWireType
  167. }
  168. msg := new(Mutation_Write)
  169. err := b.DecodeMessage(msg)
  170. m.Operation = &Mutation_Insert{msg}
  171. return true, err
  172. case 2: // operation.update
  173. if wire != proto.WireBytes {
  174. return true, proto.ErrInternalBadWireType
  175. }
  176. msg := new(Mutation_Write)
  177. err := b.DecodeMessage(msg)
  178. m.Operation = &Mutation_Update{msg}
  179. return true, err
  180. case 3: // operation.insert_or_update
  181. if wire != proto.WireBytes {
  182. return true, proto.ErrInternalBadWireType
  183. }
  184. msg := new(Mutation_Write)
  185. err := b.DecodeMessage(msg)
  186. m.Operation = &Mutation_InsertOrUpdate{msg}
  187. return true, err
  188. case 4: // operation.replace
  189. if wire != proto.WireBytes {
  190. return true, proto.ErrInternalBadWireType
  191. }
  192. msg := new(Mutation_Write)
  193. err := b.DecodeMessage(msg)
  194. m.Operation = &Mutation_Replace{msg}
  195. return true, err
  196. case 5: // operation.delete
  197. if wire != proto.WireBytes {
  198. return true, proto.ErrInternalBadWireType
  199. }
  200. msg := new(Mutation_Delete)
  201. err := b.DecodeMessage(msg)
  202. m.Operation = &Mutation_Delete_{msg}
  203. return true, err
  204. default:
  205. return false, nil
  206. }
  207. }
  208. func _Mutation_OneofSizer(msg proto.Message) (n int) {
  209. m := msg.(*Mutation)
  210. // operation
  211. switch x := m.Operation.(type) {
  212. case *Mutation_Insert:
  213. s := proto.Size(x.Insert)
  214. n += 1 // tag and wire
  215. n += proto.SizeVarint(uint64(s))
  216. n += s
  217. case *Mutation_Update:
  218. s := proto.Size(x.Update)
  219. n += 1 // tag and wire
  220. n += proto.SizeVarint(uint64(s))
  221. n += s
  222. case *Mutation_InsertOrUpdate:
  223. s := proto.Size(x.InsertOrUpdate)
  224. n += 1 // tag and wire
  225. n += proto.SizeVarint(uint64(s))
  226. n += s
  227. case *Mutation_Replace:
  228. s := proto.Size(x.Replace)
  229. n += 1 // tag and wire
  230. n += proto.SizeVarint(uint64(s))
  231. n += s
  232. case *Mutation_Delete_:
  233. s := proto.Size(x.Delete)
  234. n += 1 // tag and wire
  235. n += proto.SizeVarint(uint64(s))
  236. n += s
  237. case nil:
  238. default:
  239. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  240. }
  241. return n
  242. }
  243. // Arguments to [insert][google.spanner.v1.Mutation.insert],
  244. // [update][google.spanner.v1.Mutation.update],
  245. // [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and
  246. // [replace][google.spanner.v1.Mutation.replace] operations.
  247. type Mutation_Write struct {
  248. // Required. The table whose rows will be written.
  249. Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`
  250. // The names of the columns in
  251. // [table][google.spanner.v1.Mutation.Write.table] to be written.
  252. //
  253. // The list of columns must contain enough columns to allow
  254. // Cloud Spanner to derive values for all primary key columns in the
  255. // row(s) to be modified.
  256. Columns []string `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"`
  257. // The values to be written. `values` can contain more than one
  258. // list of values. If it does, then multiple rows are written, one
  259. // for each entry in `values`. Each list in `values` must have
  260. // exactly as many entries as there are entries in
  261. // [columns][google.spanner.v1.Mutation.Write.columns] above. Sending
  262. // multiple lists is equivalent to sending multiple `Mutation`s, each
  263. // containing one `values` entry and repeating
  264. // [table][google.spanner.v1.Mutation.Write.table] and
  265. // [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in
  266. // each list are encoded as described [here][google.spanner.v1.TypeCode].
  267. Values []*_struct.ListValue `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
  268. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  269. XXX_unrecognized []byte `json:"-"`
  270. XXX_sizecache int32 `json:"-"`
  271. }
  272. func (m *Mutation_Write) Reset() { *m = Mutation_Write{} }
  273. func (m *Mutation_Write) String() string { return proto.CompactTextString(m) }
  274. func (*Mutation_Write) ProtoMessage() {}
  275. func (*Mutation_Write) Descriptor() ([]byte, []int) {
  276. return fileDescriptor_mutation_7ac3401eb5ab6104, []int{0, 0}
  277. }
  278. func (m *Mutation_Write) XXX_Unmarshal(b []byte) error {
  279. return xxx_messageInfo_Mutation_Write.Unmarshal(m, b)
  280. }
  281. func (m *Mutation_Write) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  282. return xxx_messageInfo_Mutation_Write.Marshal(b, m, deterministic)
  283. }
  284. func (dst *Mutation_Write) XXX_Merge(src proto.Message) {
  285. xxx_messageInfo_Mutation_Write.Merge(dst, src)
  286. }
  287. func (m *Mutation_Write) XXX_Size() int {
  288. return xxx_messageInfo_Mutation_Write.Size(m)
  289. }
  290. func (m *Mutation_Write) XXX_DiscardUnknown() {
  291. xxx_messageInfo_Mutation_Write.DiscardUnknown(m)
  292. }
  293. var xxx_messageInfo_Mutation_Write proto.InternalMessageInfo
  294. func (m *Mutation_Write) GetTable() string {
  295. if m != nil {
  296. return m.Table
  297. }
  298. return ""
  299. }
  300. func (m *Mutation_Write) GetColumns() []string {
  301. if m != nil {
  302. return m.Columns
  303. }
  304. return nil
  305. }
  306. func (m *Mutation_Write) GetValues() []*_struct.ListValue {
  307. if m != nil {
  308. return m.Values
  309. }
  310. return nil
  311. }
  312. // Arguments to [delete][google.spanner.v1.Mutation.delete] operations.
  313. type Mutation_Delete struct {
  314. // Required. The table whose rows will be deleted.
  315. Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`
  316. // Required. The primary keys of the rows within
  317. // [table][google.spanner.v1.Mutation.Delete.table] to delete. Delete is
  318. // idempotent. The transaction will succeed even if some or all rows do not
  319. // exist.
  320. KeySet *KeySet `protobuf:"bytes,2,opt,name=key_set,json=keySet,proto3" json:"key_set,omitempty"`
  321. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  322. XXX_unrecognized []byte `json:"-"`
  323. XXX_sizecache int32 `json:"-"`
  324. }
  325. func (m *Mutation_Delete) Reset() { *m = Mutation_Delete{} }
  326. func (m *Mutation_Delete) String() string { return proto.CompactTextString(m) }
  327. func (*Mutation_Delete) ProtoMessage() {}
  328. func (*Mutation_Delete) Descriptor() ([]byte, []int) {
  329. return fileDescriptor_mutation_7ac3401eb5ab6104, []int{0, 1}
  330. }
  331. func (m *Mutation_Delete) XXX_Unmarshal(b []byte) error {
  332. return xxx_messageInfo_Mutation_Delete.Unmarshal(m, b)
  333. }
  334. func (m *Mutation_Delete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  335. return xxx_messageInfo_Mutation_Delete.Marshal(b, m, deterministic)
  336. }
  337. func (dst *Mutation_Delete) XXX_Merge(src proto.Message) {
  338. xxx_messageInfo_Mutation_Delete.Merge(dst, src)
  339. }
  340. func (m *Mutation_Delete) XXX_Size() int {
  341. return xxx_messageInfo_Mutation_Delete.Size(m)
  342. }
  343. func (m *Mutation_Delete) XXX_DiscardUnknown() {
  344. xxx_messageInfo_Mutation_Delete.DiscardUnknown(m)
  345. }
  346. var xxx_messageInfo_Mutation_Delete proto.InternalMessageInfo
  347. func (m *Mutation_Delete) GetTable() string {
  348. if m != nil {
  349. return m.Table
  350. }
  351. return ""
  352. }
  353. func (m *Mutation_Delete) GetKeySet() *KeySet {
  354. if m != nil {
  355. return m.KeySet
  356. }
  357. return nil
  358. }
  359. func init() {
  360. proto.RegisterType((*Mutation)(nil), "google.spanner.v1.Mutation")
  361. proto.RegisterType((*Mutation_Write)(nil), "google.spanner.v1.Mutation.Write")
  362. proto.RegisterType((*Mutation_Delete)(nil), "google.spanner.v1.Mutation.Delete")
  363. }
  364. func init() {
  365. proto.RegisterFile("google/spanner/v1/mutation.proto", fileDescriptor_mutation_7ac3401eb5ab6104)
  366. }
  367. var fileDescriptor_mutation_7ac3401eb5ab6104 = []byte{
  368. // 413 bytes of a gzipped FileDescriptorProto
  369. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xd1, 0xea, 0xd3, 0x30,
  370. 0x14, 0xc6, 0xed, 0xba, 0x75, 0x2e, 0x43, 0xd1, 0xa2, 0x58, 0x8b, 0x17, 0x75, 0x57, 0xbb, 0x4a,
  371. 0x69, 0xbd, 0x11, 0xa6, 0x37, 0x53, 0x50, 0xd0, 0xe1, 0xe8, 0x70, 0x82, 0x0c, 0x46, 0xd6, 0x1d,
  372. 0x4b, 0x69, 0x96, 0x94, 0x24, 0x1d, 0xec, 0x45, 0xbc, 0xf4, 0x01, 0x7c, 0x14, 0x9f, 0x4a, 0x9a,
  373. 0xa4, 0x32, 0x9c, 0xfe, 0xd9, 0xff, 0xaa, 0x3d, 0x7c, 0xdf, 0xef, 0x3b, 0xe7, 0x24, 0x41, 0x51,
  374. 0xc1, 0x79, 0x41, 0x21, 0x96, 0x35, 0x61, 0x0c, 0x44, 0x7c, 0x4c, 0xe2, 0x43, 0xa3, 0x88, 0x2a,
  375. 0x39, 0xc3, 0xb5, 0xe0, 0x8a, 0xfb, 0x0f, 0x8d, 0x03, 0x5b, 0x07, 0x3e, 0x26, 0xe1, 0x33, 0x0b,
  376. 0x91, 0xba, 0x8c, 0x09, 0x63, 0xdc, 0xf8, 0xa5, 0x01, 0xfe, 0xa8, 0xba, 0xda, 0x35, 0xdf, 0x62,
  377. 0xa9, 0x44, 0x93, 0xab, 0xbf, 0xd4, 0xb3, 0x86, 0x15, 0x9c, 0x2c, 0x3b, 0xf9, 0xd1, 0x47, 0x77,
  378. 0x17, 0xb6, 0xbf, 0x3f, 0x43, 0x5e, 0xc9, 0x24, 0x08, 0x15, 0x38, 0x91, 0x33, 0x1d, 0xa7, 0xcf,
  379. 0xf1, 0xc5, 0x28, 0xb8, 0x33, 0xe3, 0x2f, 0xa2, 0x54, 0xf0, 0xfe, 0x4e, 0x66, 0x91, 0x16, 0x6e,
  380. 0xea, 0x3d, 0x51, 0x10, 0xf4, 0x6e, 0x01, 0x1b, 0xc4, 0x5f, 0xa0, 0x07, 0x26, 0x66, 0xcb, 0xc5,
  381. 0xd6, 0xc6, 0xb8, 0xd7, 0xc7, 0xdc, 0x37, 0xf0, 0x27, 0xf1, 0xd9, 0xc4, 0xbd, 0x46, 0x43, 0x01,
  382. 0x35, 0x25, 0x39, 0x04, 0xfd, 0xeb, 0x53, 0x3a, 0xc6, 0x7f, 0x85, 0xbc, 0x3d, 0x50, 0x50, 0x10,
  383. 0x0c, 0x34, 0x3d, 0xb9, 0x89, 0x7e, 0xab, 0x9d, 0xed, 0x2e, 0x86, 0x09, 0x2b, 0x34, 0xd0, 0x89,
  384. 0xfe, 0x23, 0x34, 0x50, 0x64, 0x47, 0x41, 0x9f, 0xe6, 0x28, 0x33, 0x85, 0x1f, 0xa0, 0x61, 0xce,
  385. 0x69, 0x73, 0x60, 0x32, 0xe8, 0x45, 0xee, 0x74, 0x94, 0x75, 0xa5, 0x9f, 0x22, 0xef, 0x48, 0x68,
  386. 0x03, 0x32, 0x70, 0x23, 0x77, 0x3a, 0x4e, 0xc3, 0xae, 0x6d, 0x77, 0xb1, 0xf8, 0x63, 0x29, 0xd5,
  387. 0xba, 0xb5, 0x64, 0xd6, 0x19, 0x66, 0xc8, 0x33, 0x03, 0xfc, 0xa7, 0x5b, 0x8a, 0x86, 0x15, 0x9c,
  388. 0xb6, 0x12, 0x94, 0xbd, 0x96, 0xa7, 0xff, 0xd8, 0xe5, 0x03, 0x9c, 0x56, 0xa0, 0x32, 0xaf, 0xd2,
  389. 0xdf, 0xf9, 0x18, 0x8d, 0x78, 0x0d, 0x42, 0xaf, 0x37, 0xff, 0xee, 0xa0, 0xc7, 0x39, 0x3f, 0x5c,
  390. 0x52, 0xf3, 0x7b, 0xdd, 0x11, 0x2c, 0xdb, 0xf1, 0x96, 0xce, 0xd7, 0x97, 0xd6, 0x53, 0x70, 0x4a,
  391. 0x58, 0x81, 0xb9, 0x28, 0xe2, 0x02, 0x98, 0x1e, 0x3e, 0x36, 0x12, 0xa9, 0x4b, 0x79, 0xf6, 0x10,
  392. 0x67, 0xf6, 0xf7, 0x67, 0xef, 0xc9, 0x3b, 0x83, 0xbe, 0xa1, 0xbc, 0xd9, 0xe3, 0x95, 0x6d, 0xb2,
  393. 0x4e, 0x7e, 0x75, 0xca, 0x46, 0x2b, 0x1b, 0xab, 0x6c, 0xd6, 0xc9, 0xce, 0xd3, 0xc1, 0x2f, 0x7e,
  394. 0x07, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x69, 0x1c, 0xbc, 0x51, 0x03, 0x00, 0x00,
  395. }