| 1 |
// Copyright 2025 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
// Code generated by protoc-gen-go. DO NOT EDIT. |
| 16 |
// versions: |
| 17 |
// protoc-gen-go v1.35.2 |
| 18 |
// protoc v4.25.7 |
| 19 |
// source: google/cloud/bigquery/v2/data_format_options.proto |
| 20 |
|
| 21 |
package bigquerypb |
| 22 |
|
| 23 |
import ( |
| 24 |
_ "google.golang.org/genproto/googleapis/api/annotations" |
| 25 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 26 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 27 |
reflect "reflect" |
| 28 |
sync "sync" |
| 29 |
) |
| 30 |
|
| 31 |
const ( |
| 32 |
// Verify that this generated code is sufficiently up-to-date. |
| 33 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 34 |
// Verify that runtime/protoimpl is sufficiently up-to-date. |
| 35 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 36 |
) |
| 37 |
|
| 38 |
// The API output format for a timestamp. |
| 39 |
type DataFormatOptions_TimestampOutputFormat int32 |
| 40 |
|
| 41 |
const ( |
| 42 |
// Corresponds to default API output behavior, which is FLOAT64. |
| 43 |
DataFormatOptions_TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED DataFormatOptions_TimestampOutputFormat = 0 |
| 44 |
// Timestamp is output as float64 seconds since Unix epoch. |
| 45 |
DataFormatOptions_FLOAT64 DataFormatOptions_TimestampOutputFormat = 1 |
| 46 |
// Timestamp is output as int64 microseconds since Unix epoch. |
| 47 |
DataFormatOptions_INT64 DataFormatOptions_TimestampOutputFormat = 2 |
| 48 |
// Timestamp is output as ISO 8601 String |
| 49 |
// ("YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ"). |
| 50 |
DataFormatOptions_ISO8601_STRING DataFormatOptions_TimestampOutputFormat = 3 |
| 51 |
) |
| 52 |
|
| 53 |
// Enum value maps for DataFormatOptions_TimestampOutputFormat. |
| 54 |
var ( |
| 55 |
DataFormatOptions_TimestampOutputFormat_name = map[int32]string{ |
| 56 |
0: "TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED", |
| 57 |
1: "FLOAT64", |
| 58 |
2: "INT64", |
| 59 |
3: "ISO8601_STRING", |
| 60 |
} |
| 61 |
DataFormatOptions_TimestampOutputFormat_value = map[string]int32{ |
| 62 |
"TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED": 0, |
| 63 |
"FLOAT64": 1, |
| 64 |
"INT64": 2, |
| 65 |
"ISO8601_STRING": 3, |
| 66 |
} |
| 67 |
) |
| 68 |
|
| 69 |
func (x DataFormatOptions_TimestampOutputFormat) Enum() *DataFormatOptions_TimestampOutputFormat { |
| 70 |
p := new(DataFormatOptions_TimestampOutputFormat) |
| 71 |
*p = x |
| 72 |
return p |
| 73 |
} |
| 74 |
|
| 75 |
func (x DataFormatOptions_TimestampOutputFormat) String() string { |
| 76 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 77 |
} |
| 78 |
|
| 79 |
func (DataFormatOptions_TimestampOutputFormat) Descriptor() protoreflect.EnumDescriptor { |
| 80 |
return file_google_cloud_bigquery_v2_data_format_options_proto_enumTypes[0].Descriptor() |
| 81 |
} |
| 82 |
|
| 83 |
func (DataFormatOptions_TimestampOutputFormat) Type() protoreflect.EnumType { |
| 84 |
return &file_google_cloud_bigquery_v2_data_format_options_proto_enumTypes[0] |
| 85 |
} |
| 86 |
|
| 87 |
func (x DataFormatOptions_TimestampOutputFormat) Number() protoreflect.EnumNumber { |
| 88 |
return protoreflect.EnumNumber(x) |
| 89 |
} |
| 90 |
|
| 91 |
// Deprecated: Use DataFormatOptions_TimestampOutputFormat.Descriptor instead. |
| 92 |
func (DataFormatOptions_TimestampOutputFormat) EnumDescriptor() ([]byte, []int) { |
| 93 |
return file_google_cloud_bigquery_v2_data_format_options_proto_rawDescGZIP(), []int{0, 0} |
| 94 |
} |
| 95 |
|
| 96 |
// Options for data format adjustments. |
| 97 |
type DataFormatOptions struct { |
| 98 |
state protoimpl.MessageState |
| 99 |
sizeCache protoimpl.SizeCache |
| 100 |
unknownFields protoimpl.UnknownFields |
| 101 |
|
| 102 |
// Optional. Output timestamp as usec int64. Default is false. |
| 103 |
UseInt64Timestamp bool `protobuf:"varint,1,opt,name=use_int64_timestamp,json=useInt64Timestamp,proto3" json:"use_int64_timestamp,omitempty"` |
| 104 |
// Optional. The API output format for a timestamp. |
| 105 |
// This offers more explicit control over the timestamp output format |
| 106 |
// as compared to the existing `use_int64_timestamp` option. |
| 107 |
TimestampOutputFormat DataFormatOptions_TimestampOutputFormat `protobuf:"varint,3,opt,name=timestamp_output_format,json=timestampOutputFormat,proto3,enum=google.cloud.bigquery.v2.DataFormatOptions_TimestampOutputFormat" json:"timestamp_output_format,omitempty"` |
| 108 |
} |
| 109 |
|
| 110 |
func (x *DataFormatOptions) Reset() { |
| 111 |
*x = DataFormatOptions{} |
| 112 |
mi := &file_google_cloud_bigquery_v2_data_format_options_proto_msgTypes[0] |
| 113 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 114 |
ms.StoreMessageInfo(mi) |
| 115 |
} |
| 116 |
|
| 117 |
func (x *DataFormatOptions) String() string { |
| 118 |
return protoimpl.X.MessageStringOf(x) |
| 119 |
} |
| 120 |
|
| 121 |
func (*DataFormatOptions) ProtoMessage() {} |
| 122 |
|
| 123 |
func (x *DataFormatOptions) ProtoReflect() protoreflect.Message { |
| 124 |
mi := &file_google_cloud_bigquery_v2_data_format_options_proto_msgTypes[0] |
| 125 |
if x != nil { |
| 126 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 127 |
if ms.LoadMessageInfo() == nil { |
| 128 |
ms.StoreMessageInfo(mi) |
| 129 |
} |
| 130 |
return ms |
| 131 |
} |
| 132 |
return mi.MessageOf(x) |
| 133 |
} |
| 134 |
|
| 135 |
// Deprecated: Use DataFormatOptions.ProtoReflect.Descriptor instead. |
| 136 |
func (*DataFormatOptions) Descriptor() ([]byte, []int) { |
| 137 |
return file_google_cloud_bigquery_v2_data_format_options_proto_rawDescGZIP(), []int{0} |
| 138 |
} |
| 139 |
|
| 140 |
func (x *DataFormatOptions) GetUseInt64Timestamp() bool { |
| 141 |
if x != nil { |
| 142 |
return x.UseInt64Timestamp |
| 143 |
} |
| 144 |
return false |
| 145 |
} |
| 146 |
|
| 147 |
func (x *DataFormatOptions) GetTimestampOutputFormat() DataFormatOptions_TimestampOutputFormat { |
| 148 |
if x != nil { |
| 149 |
return x.TimestampOutputFormat |
| 150 |
} |
| 151 |
return DataFormatOptions_TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED |
| 152 |
} |
| 153 |
|
| 154 |
var File_google_cloud_bigquery_v2_data_format_options_proto protoreflect.FileDescriptor |
| 155 |
|
| 156 |
var file_google_cloud_bigquery_v2_data_format_options_proto_rawDesc = []byte{ |
| 157 |
0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, |
| 158 |
0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, |
| 159 |
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, |
| 160 |
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, |
| 161 |
0x75, 0x64, 0x2e, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x1a, 0x1f, |
| 162 |
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, |
| 163 |
0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, |
| 164 |
0xb6, 0x02, 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x4f, 0x70, |
| 165 |
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, |
| 166 |
0x36, 0x34, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, |
| 167 |
0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x36, |
| 168 |
0x34, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x7e, 0x0a, 0x17, 0x74, 0x69, |
| 169 |
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, |
| 170 |
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x67, 0x6f, |
| 171 |
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x67, 0x71, 0x75, |
| 172 |
0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, |
| 173 |
0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, |
| 174 |
0x6d, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x03, |
| 175 |
0xe0, 0x41, 0x01, 0x52, 0x15, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4f, 0x75, |
| 176 |
0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x6c, 0x0a, 0x15, 0x54, 0x69, |
| 177 |
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, |
| 178 |
0x6d, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, |
| 179 |
0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, |
| 180 |
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, |
| 181 |
0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, |
| 182 |
0x36, 0x34, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x53, 0x4f, 0x38, 0x36, 0x30, 0x31, 0x5f, |
| 183 |
0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x73, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, |
| 184 |
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x67, |
| 185 |
0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x16, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, |
| 186 |
0x72, 0x6d, 0x61, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, |
| 187 |
0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, |
| 188 |
0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, |
| 189 |
0x32, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, |
| 190 |
0x70, 0x62, 0x3b, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, |
| 191 |
0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 192 |
} |
| 193 |
|
| 194 |
var ( |
| 195 |
file_google_cloud_bigquery_v2_data_format_options_proto_rawDescOnce sync.Once |
| 196 |
file_google_cloud_bigquery_v2_data_format_options_proto_rawDescData = file_google_cloud_bigquery_v2_data_format_options_proto_rawDesc |
| 197 |
) |
| 198 |
|
| 199 |
func file_google_cloud_bigquery_v2_data_format_options_proto_rawDescGZIP() []byte { |
| 200 |
file_google_cloud_bigquery_v2_data_format_options_proto_rawDescOnce.Do(func() { |
| 201 |
file_google_cloud_bigquery_v2_data_format_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_bigquery_v2_data_format_options_proto_rawDescData) |
| 202 |
}) |
| 203 |
return file_google_cloud_bigquery_v2_data_format_options_proto_rawDescData |
| 204 |
} |
| 205 |
|
| 206 |
var file_google_cloud_bigquery_v2_data_format_options_proto_enumTypes = make([]protoimpl.EnumInfo, 1) |
| 207 |
var file_google_cloud_bigquery_v2_data_format_options_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 208 |
var file_google_cloud_bigquery_v2_data_format_options_proto_goTypes = []any{ |
| 209 |
(DataFormatOptions_TimestampOutputFormat)(0), // 0: google.cloud.bigquery.v2.DataFormatOptions.TimestampOutputFormat |
| 210 |
(*DataFormatOptions)(nil), // 1: google.cloud.bigquery.v2.DataFormatOptions |
| 211 |
} |
| 212 |
var file_google_cloud_bigquery_v2_data_format_options_proto_depIdxs = []int32{ |
| 213 |
0, // 0: google.cloud.bigquery.v2.DataFormatOptions.timestamp_output_format:type_name -> google.cloud.bigquery.v2.DataFormatOptions.TimestampOutputFormat |
| 214 |
1, // [1:1] is the sub-list for method output_type |
| 215 |
1, // [1:1] is the sub-list for method input_type |
| 216 |
1, // [1:1] is the sub-list for extension type_name |
| 217 |
1, // [1:1] is the sub-list for extension extendee |
| 218 |
0, // [0:1] is the sub-list for field type_name |
| 219 |
} |
| 220 |
|
| 221 |
func init() { file_google_cloud_bigquery_v2_data_format_options_proto_init() } |
| 222 |
func file_google_cloud_bigquery_v2_data_format_options_proto_init() { |
| 223 |
if File_google_cloud_bigquery_v2_data_format_options_proto != nil { |
| 224 |
return |
| 225 |
} |
| 226 |
type x struct{} |
| 227 |
out := protoimpl.TypeBuilder{ |
| 228 |
File: protoimpl.DescBuilder{ |
| 229 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 230 |
RawDescriptor: file_google_cloud_bigquery_v2_data_format_options_proto_rawDesc, |
| 231 |
NumEnums: 1, |
| 232 |
NumMessages: 1, |
| 233 |
NumExtensions: 0, |
| 234 |
NumServices: 0, |
| 235 |
}, |
| 236 |
GoTypes: file_google_cloud_bigquery_v2_data_format_options_proto_goTypes, |
| 237 |
DependencyIndexes: file_google_cloud_bigquery_v2_data_format_options_proto_depIdxs, |
| 238 |
EnumInfos: file_google_cloud_bigquery_v2_data_format_options_proto_enumTypes, |
| 239 |
MessageInfos: file_google_cloud_bigquery_v2_data_format_options_proto_msgTypes, |
| 240 |
}.Build() |
| 241 |
File_google_cloud_bigquery_v2_data_format_options_proto = out.File |
| 242 |
file_google_cloud_bigquery_v2_data_format_options_proto_rawDesc = nil |
| 243 |
file_google_cloud_bigquery_v2_data_format_options_proto_goTypes = nil |
| 244 |
file_google_cloud_bigquery_v2_data_format_options_proto_depIdxs = nil |
| 245 |
} |