sql_utils/public/deprecation_warning.proto (45 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; import "sql_utils/public/error_location.proto"; // Contains information about a deprecation warning emitted by the // analyzer. Currently attached to any absl::Status returned by // AnalyzerOutput::deprecation_warnings(). message DeprecationWarning { enum Kind { // User code that switches on this enum must have a default case so // builds won't break if new enums get added. __Kind__switch_must_have_a_default__ = -1; UNKNOWN = 0; DEPRECATED_FUNCTION = 1; DEPRECATED_FUNCTION_SIGNATURE = 2; // proto.has_<field>() is not well-defined if 'proto' comes from a file with // proto3 syntax, but it is currently supported by the analyzer. PROTO3_FIELD_PRESENCE = 3; } optional Kind kind = 1; } // A non-absl::Status-based representation of a deprecation warning that can be // stored in objects that can be stored in the resolved AST (e.g., // FunctionSignatures). // message FreestandingDeprecationWarning { optional string message = 1; optional string caret_string = 2; optional ErrorLocation error_location = 3; optional DeprecationWarning deprecation_warning = 4; }