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