// Copyright 2025 Envoy Project Authors
//
// 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 = "proto3";

package envoy.annotations;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/annotations";

import "google/protobuf/descriptor.proto";

// [#protodoc-title: Deprecation]
// Adds annotations for deprecated fields and enums to allow tagging proto
// fields as fatal by default and the minor version on which the field was
// deprecated. One Envoy release after deprecation, deprecated fields will be
// disallowed by default, a state which is reversible with
// :ref:`runtime overrides <config_runtime_deprecation>`.

// Magic number in this file derived from top 28bit of SHA256 digest of
// "envoy.annotation.disallowed_by_default" and "envoy.annotation.deprecated_at_minor_version"
extend google.protobuf.FieldOptions {
  bool disallowed_by_default = 189503207;

  // The API major and minor version on which the field was deprecated
  // (e.g., "3.5" for major version 3 and minor version 5).
  string deprecated_at_minor_version = 157299826;
}

// Magic number in this file derived from top 28bit of SHA256 digest of
// "envoy.annotation.disallowed_by_default_enum" and
// "envoy.annotation.deprecated_at_minor_version_eum"
extend google.protobuf.EnumValueOptions {
  bool disallowed_by_default_enum = 70100853;

  // The API major and minor version on which the enum value was deprecated
  // (e.g., "3.5" for major version 3 and minor version 5).
  string deprecated_at_minor_version_enum = 181198657;
}
