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