You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

302 lines
12 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/spanner/v1/type.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 _ "google.golang.org/genproto/googleapis/api/annotations"
  8. // Reference imports to suppress errors if they are not otherwise used.
  9. var _ = proto.Marshal
  10. var _ = fmt.Errorf
  11. var _ = math.Inf
  12. // This is a compile-time assertion to ensure that this generated file
  13. // is compatible with the proto package it is being compiled against.
  14. // A compilation error at this line likely means your copy of the
  15. // proto package needs to be updated.
  16. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  17. // `TypeCode` is used as part of [Type][google.spanner.v1.Type] to
  18. // indicate the type of a Cloud Spanner value.
  19. //
  20. // Each legal value of a type can be encoded to or decoded from a JSON
  21. // value, using the encodings described below. All Cloud Spanner values can
  22. // be `null`, regardless of type; `null`s are always encoded as a JSON
  23. // `null`.
  24. type TypeCode int32
  25. const (
  26. // Not specified.
  27. TypeCode_TYPE_CODE_UNSPECIFIED TypeCode = 0
  28. // Encoded as JSON `true` or `false`.
  29. TypeCode_BOOL TypeCode = 1
  30. // Encoded as `string`, in decimal format.
  31. TypeCode_INT64 TypeCode = 2
  32. // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
  33. // `"-Infinity"`.
  34. TypeCode_FLOAT64 TypeCode = 3
  35. // Encoded as `string` in RFC 3339 timestamp format. The time zone
  36. // must be present, and must be `"Z"`.
  37. //
  38. // If the schema has the column option
  39. // `allow_commit_timestamp=true`, the placeholder string
  40. // `"spanner.commit_timestamp()"` can be used to instruct the system
  41. // to insert the commit timestamp associated with the transaction
  42. // commit.
  43. TypeCode_TIMESTAMP TypeCode = 4
  44. // Encoded as `string` in RFC 3339 date format.
  45. TypeCode_DATE TypeCode = 5
  46. // Encoded as `string`.
  47. TypeCode_STRING TypeCode = 6
  48. // Encoded as a base64-encoded `string`, as described in RFC 4648,
  49. // section 4.
  50. TypeCode_BYTES TypeCode = 7
  51. // Encoded as `list`, where the list elements are represented
  52. // according to
  53. // [array_element_type][google.spanner.v1.Type.array_element_type].
  54. TypeCode_ARRAY TypeCode = 8
  55. // Encoded as `list`, where list element `i` is represented according
  56. // to [struct_type.fields[i]][google.spanner.v1.StructType.fields].
  57. TypeCode_STRUCT TypeCode = 9
  58. )
  59. var TypeCode_name = map[int32]string{
  60. 0: "TYPE_CODE_UNSPECIFIED",
  61. 1: "BOOL",
  62. 2: "INT64",
  63. 3: "FLOAT64",
  64. 4: "TIMESTAMP",
  65. 5: "DATE",
  66. 6: "STRING",
  67. 7: "BYTES",
  68. 8: "ARRAY",
  69. 9: "STRUCT",
  70. }
  71. var TypeCode_value = map[string]int32{
  72. "TYPE_CODE_UNSPECIFIED": 0,
  73. "BOOL": 1,
  74. "INT64": 2,
  75. "FLOAT64": 3,
  76. "TIMESTAMP": 4,
  77. "DATE": 5,
  78. "STRING": 6,
  79. "BYTES": 7,
  80. "ARRAY": 8,
  81. "STRUCT": 9,
  82. }
  83. func (x TypeCode) String() string {
  84. return proto.EnumName(TypeCode_name, int32(x))
  85. }
  86. func (TypeCode) EnumDescriptor() ([]byte, []int) {
  87. return fileDescriptor_type_fd75b23a4d0055d4, []int{0}
  88. }
  89. // `Type` indicates the type of a Cloud Spanner value, as might be stored in a
  90. // table cell or returned from an SQL query.
  91. type Type struct {
  92. // Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.
  93. Code TypeCode `protobuf:"varint,1,opt,name=code,proto3,enum=google.spanner.v1.TypeCode" json:"code,omitempty"`
  94. // If [code][google.spanner.v1.Type.code] ==
  95. // [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the
  96. // type of the array elements.
  97. ArrayElementType *Type `protobuf:"bytes,2,opt,name=array_element_type,json=arrayElementType,proto3" json:"array_element_type,omitempty"`
  98. // If [code][google.spanner.v1.Type.code] ==
  99. // [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides
  100. // type information for the struct's fields.
  101. StructType *StructType `protobuf:"bytes,3,opt,name=struct_type,json=structType,proto3" json:"struct_type,omitempty"`
  102. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  103. XXX_unrecognized []byte `json:"-"`
  104. XXX_sizecache int32 `json:"-"`
  105. }
  106. func (m *Type) Reset() { *m = Type{} }
  107. func (m *Type) String() string { return proto.CompactTextString(m) }
  108. func (*Type) ProtoMessage() {}
  109. func (*Type) Descriptor() ([]byte, []int) {
  110. return fileDescriptor_type_fd75b23a4d0055d4, []int{0}
  111. }
  112. func (m *Type) XXX_Unmarshal(b []byte) error {
  113. return xxx_messageInfo_Type.Unmarshal(m, b)
  114. }
  115. func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  116. return xxx_messageInfo_Type.Marshal(b, m, deterministic)
  117. }
  118. func (dst *Type) XXX_Merge(src proto.Message) {
  119. xxx_messageInfo_Type.Merge(dst, src)
  120. }
  121. func (m *Type) XXX_Size() int {
  122. return xxx_messageInfo_Type.Size(m)
  123. }
  124. func (m *Type) XXX_DiscardUnknown() {
  125. xxx_messageInfo_Type.DiscardUnknown(m)
  126. }
  127. var xxx_messageInfo_Type proto.InternalMessageInfo
  128. func (m *Type) GetCode() TypeCode {
  129. if m != nil {
  130. return m.Code
  131. }
  132. return TypeCode_TYPE_CODE_UNSPECIFIED
  133. }
  134. func (m *Type) GetArrayElementType() *Type {
  135. if m != nil {
  136. return m.ArrayElementType
  137. }
  138. return nil
  139. }
  140. func (m *Type) GetStructType() *StructType {
  141. if m != nil {
  142. return m.StructType
  143. }
  144. return nil
  145. }
  146. // `StructType` defines the fields of a
  147. // [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
  148. type StructType struct {
  149. // The list of fields that make up this struct. Order is
  150. // significant, because values of this struct type are represented as
  151. // lists, where the order of field values matches the order of
  152. // fields in the [StructType][google.spanner.v1.StructType]. In turn, the
  153. // order of fields matches the order of columns in a read request, or the
  154. // order of fields in the `SELECT` clause of a query.
  155. Fields []*StructType_Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
  156. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  157. XXX_unrecognized []byte `json:"-"`
  158. XXX_sizecache int32 `json:"-"`
  159. }
  160. func (m *StructType) Reset() { *m = StructType{} }
  161. func (m *StructType) String() string { return proto.CompactTextString(m) }
  162. func (*StructType) ProtoMessage() {}
  163. func (*StructType) Descriptor() ([]byte, []int) {
  164. return fileDescriptor_type_fd75b23a4d0055d4, []int{1}
  165. }
  166. func (m *StructType) XXX_Unmarshal(b []byte) error {
  167. return xxx_messageInfo_StructType.Unmarshal(m, b)
  168. }
  169. func (m *StructType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  170. return xxx_messageInfo_StructType.Marshal(b, m, deterministic)
  171. }
  172. func (dst *StructType) XXX_Merge(src proto.Message) {
  173. xxx_messageInfo_StructType.Merge(dst, src)
  174. }
  175. func (m *StructType) XXX_Size() int {
  176. return xxx_messageInfo_StructType.Size(m)
  177. }
  178. func (m *StructType) XXX_DiscardUnknown() {
  179. xxx_messageInfo_StructType.DiscardUnknown(m)
  180. }
  181. var xxx_messageInfo_StructType proto.InternalMessageInfo
  182. func (m *StructType) GetFields() []*StructType_Field {
  183. if m != nil {
  184. return m.Fields
  185. }
  186. return nil
  187. }
  188. // Message representing a single field of a struct.
  189. type StructType_Field struct {
  190. // The name of the field. For reads, this is the column name. For
  191. // SQL queries, it is the column alias (e.g., `"Word"` in the
  192. // query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
  193. // `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
  194. // columns might have an empty name (e.g., !"SELECT
  195. // UPPER(ColName)"`). Note that a query result can contain
  196. // multiple fields with the same name.
  197. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  198. // The type of the field.
  199. Type *Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
  200. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  201. XXX_unrecognized []byte `json:"-"`
  202. XXX_sizecache int32 `json:"-"`
  203. }
  204. func (m *StructType_Field) Reset() { *m = StructType_Field{} }
  205. func (m *StructType_Field) String() string { return proto.CompactTextString(m) }
  206. func (*StructType_Field) ProtoMessage() {}
  207. func (*StructType_Field) Descriptor() ([]byte, []int) {
  208. return fileDescriptor_type_fd75b23a4d0055d4, []int{1, 0}
  209. }
  210. func (m *StructType_Field) XXX_Unmarshal(b []byte) error {
  211. return xxx_messageInfo_StructType_Field.Unmarshal(m, b)
  212. }
  213. func (m *StructType_Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  214. return xxx_messageInfo_StructType_Field.Marshal(b, m, deterministic)
  215. }
  216. func (dst *StructType_Field) XXX_Merge(src proto.Message) {
  217. xxx_messageInfo_StructType_Field.Merge(dst, src)
  218. }
  219. func (m *StructType_Field) XXX_Size() int {
  220. return xxx_messageInfo_StructType_Field.Size(m)
  221. }
  222. func (m *StructType_Field) XXX_DiscardUnknown() {
  223. xxx_messageInfo_StructType_Field.DiscardUnknown(m)
  224. }
  225. var xxx_messageInfo_StructType_Field proto.InternalMessageInfo
  226. func (m *StructType_Field) GetName() string {
  227. if m != nil {
  228. return m.Name
  229. }
  230. return ""
  231. }
  232. func (m *StructType_Field) GetType() *Type {
  233. if m != nil {
  234. return m.Type
  235. }
  236. return nil
  237. }
  238. func init() {
  239. proto.RegisterType((*Type)(nil), "google.spanner.v1.Type")
  240. proto.RegisterType((*StructType)(nil), "google.spanner.v1.StructType")
  241. proto.RegisterType((*StructType_Field)(nil), "google.spanner.v1.StructType.Field")
  242. proto.RegisterEnum("google.spanner.v1.TypeCode", TypeCode_name, TypeCode_value)
  243. }
  244. func init() { proto.RegisterFile("google/spanner/v1/type.proto", fileDescriptor_type_fd75b23a4d0055d4) }
  245. var fileDescriptor_type_fd75b23a4d0055d4 = []byte{
  246. // 444 bytes of a gzipped FileDescriptorProto
  247. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xd1, 0x8a, 0xd3, 0x40,
  248. 0x14, 0x86, 0x9d, 0x6d, 0xda, 0x6d, 0x4e, 0x51, 0xc6, 0x81, 0x65, 0xeb, 0xaa, 0x50, 0xd6, 0x9b,
  249. 0xa2, 0x90, 0xd0, 0x2a, 0x22, 0x2c, 0x08, 0x69, 0x3a, 0x5d, 0x03, 0xbb, 0x6d, 0x48, 0x66, 0x17,
  250. 0x2a, 0x85, 0x32, 0xb6, 0x63, 0x28, 0xa4, 0x33, 0x21, 0xc9, 0x2e, 0xf4, 0x25, 0xbc, 0xd0, 0xb7,
  251. 0xf0, 0x21, 0x7c, 0x00, 0x9f, 0x4a, 0x66, 0x92, 0xaa, 0xb0, 0x2a, 0xde, 0x9d, 0xe4, 0xfb, 0xbf,
  252. 0x33, 0x67, 0x86, 0x03, 0x4f, 0x12, 0xa5, 0x92, 0x54, 0xb8, 0x45, 0xc6, 0xa5, 0x14, 0xb9, 0x7b,
  253. 0x3b, 0x70, 0xcb, 0x5d, 0x26, 0x9c, 0x2c, 0x57, 0xa5, 0x22, 0x0f, 0x2b, 0xea, 0xd4, 0xd4, 0xb9,
  254. 0x1d, 0x9c, 0xec, 0x05, 0x9e, 0x6d, 0x5c, 0x2e, 0xa5, 0x2a, 0x79, 0xb9, 0x51, 0xb2, 0xa8, 0x84,
  255. 0xd3, 0x6f, 0x08, 0x2c, 0xb6, 0xcb, 0x04, 0x71, 0xc1, 0x5a, 0xa9, 0xb5, 0xe8, 0xa2, 0x1e, 0xea,
  256. 0x3f, 0x18, 0x3e, 0x76, 0xee, 0x34, 0x72, 0x74, 0xcc, 0x57, 0x6b, 0x11, 0x99, 0x20, 0xa1, 0x40,
  257. 0x78, 0x9e, 0xf3, 0xdd, 0x52, 0xa4, 0x62, 0x2b, 0x64, 0xb9, 0xd4, 0x63, 0x74, 0x0f, 0x7a, 0xa8,
  258. 0xdf, 0x19, 0x1e, 0xff, 0x45, 0x8f, 0xb0, 0x51, 0x68, 0x65, 0x98, 0x73, 0xdf, 0x42, 0xa7, 0x28,
  259. 0xf3, 0x9b, 0x55, 0xed, 0x37, 0x8c, 0xff, 0xf4, 0x0f, 0x7e, 0x6c, 0x52, 0xa6, 0x0b, 0x14, 0x3f,
  260. 0xeb, 0xd3, 0x2f, 0x08, 0xe0, 0x17, 0x22, 0x67, 0xd0, 0xfa, 0xb8, 0x11, 0xe9, 0xba, 0xe8, 0xa2,
  261. 0x5e, 0xa3, 0xdf, 0x19, 0x3e, 0xfb, 0x67, 0x27, 0x67, 0xa2, 0xb3, 0x51, 0xad, 0x9c, 0xbc, 0x83,
  262. 0xa6, 0xf9, 0x41, 0x08, 0x58, 0x92, 0x6f, 0xab, 0xc7, 0xb0, 0x23, 0x53, 0x93, 0x17, 0x60, 0xfd,
  263. 0xcf, 0x0d, 0x4d, 0xe8, 0xf9, 0x27, 0x04, 0xed, 0xfd, 0x7b, 0x91, 0x47, 0x70, 0xc4, 0xe6, 0x21,
  264. 0x5d, 0xfa, 0xb3, 0x31, 0x5d, 0x5e, 0x4d, 0xe3, 0x90, 0xfa, 0xc1, 0x24, 0xa0, 0x63, 0x7c, 0x8f,
  265. 0xb4, 0xc1, 0x1a, 0xcd, 0x66, 0x17, 0x18, 0x11, 0x1b, 0x9a, 0xc1, 0x94, 0xbd, 0x7e, 0x85, 0x0f,
  266. 0x48, 0x07, 0x0e, 0x27, 0x17, 0x33, 0x4f, 0x7f, 0x34, 0xc8, 0x7d, 0xb0, 0x59, 0x70, 0x49, 0x63,
  267. 0xe6, 0x5d, 0x86, 0xd8, 0xd2, 0xc2, 0xd8, 0x63, 0x14, 0x37, 0x09, 0x40, 0x2b, 0x66, 0x51, 0x30,
  268. 0x3d, 0xc7, 0x2d, 0x2d, 0x8f, 0xe6, 0x8c, 0xc6, 0xf8, 0x50, 0x97, 0x5e, 0x14, 0x79, 0x73, 0xdc,
  269. 0xae, 0x13, 0x57, 0x3e, 0xc3, 0xf6, 0xe8, 0x33, 0x82, 0xa3, 0x95, 0xda, 0xde, 0x9d, 0x7a, 0x64,
  270. 0xeb, 0x39, 0x43, 0xbd, 0x0c, 0x21, 0x7a, 0xff, 0xa6, 0xe6, 0x89, 0x4a, 0xb9, 0x4c, 0x1c, 0x95,
  271. 0x27, 0x6e, 0x22, 0xa4, 0x59, 0x15, 0xb7, 0x42, 0x3c, 0xdb, 0x14, 0xbf, 0x2d, 0xdf, 0x59, 0x5d,
  272. 0x7e, 0x3d, 0x38, 0x3e, 0xaf, 0x54, 0x3f, 0x55, 0x37, 0x6b, 0x27, 0xae, 0x0f, 0xb8, 0x1e, 0x7c,
  273. 0xdf, 0x93, 0x85, 0x21, 0x8b, 0x9a, 0x2c, 0xae, 0x07, 0x1f, 0x5a, 0xa6, 0xf1, 0xcb, 0x1f, 0x01,
  274. 0x00, 0x00, 0xff, 0xff, 0x55, 0xc4, 0x6e, 0xd4, 0xd4, 0x02, 0x00, 0x00,
  275. }