sql_utils/public/simple_value.proto (33 lines of code) (raw):
//
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto2";
package bigquery_ml_utils;
option cc_enable_arenas = true;
// Represents an immutable simple value. SimpleValue is a light weight version
// of value class. It can be used in the type library to avoid circular
// dependency of directly using value class in the type library.
message SimpleValueProto {
oneof value {
int64 int64_value = 1; // Set when SimpleValue::type_ is TYPE_INT64.
string string_value = 2; // Set when SimpleValue::type_ is TYPE_STRING.
bool bool_value = 3; // Set when SimpleValue::type_ is TYPE_BOOL.
double double_value = 4; // Set when SimpleValue::type_ is TYPE_DOUBLE.
bytes bytes_value = 5; // Set when SimpleValue::type_ is TYPE_BYTES.
// User code that switches on this oneof enum must have a default case so
// builds won't break when new fields are added.
bool __SimpleValueProto__switch_must_have_a_default = 255;
}
}