|
| 1 | +// |
| 2 | +// Copyright 2016, TeamDev Ltd. All rights reserved. |
| 3 | +// |
| 4 | +// Redistribution and use in source and/or binary forms, with or without |
| 5 | +// modification, must retain the above copyright notice and the following |
| 6 | +// disclaimer. |
| 7 | +// |
| 8 | +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 9 | +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 10 | +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 11 | +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 12 | +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 13 | +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 14 | +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 15 | +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 16 | +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 17 | +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 18 | +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 19 | +// |
| 20 | +syntax = "proto3"; |
| 21 | + |
| 22 | +// We do not define the package for this file to allow shorter options for user-defined types. |
| 23 | +// This would allow to write: |
| 24 | +// |
| 25 | +// option (internal) = true; |
| 26 | +// |
| 27 | +// instead of: |
| 28 | +// |
| 29 | +// option (spine.base.internal) = true; |
| 30 | +// |
| 31 | + |
| 32 | +option java_generate_equals_and_hash = false; |
| 33 | +option java_multiple_files = true; |
| 34 | +option java_outer_classname = "AnnotationsProto"; |
| 35 | +option java_package = "org.spine3.annotations"; |
| 36 | + |
| 37 | +import "google/protobuf/descriptor.proto"; |
| 38 | + |
| 39 | +// TODO:2016-02-18:alexander.litus: obtain globally unique field numbers for opts from Google. |
| 40 | + |
| 41 | + |
| 42 | +extend google.protobuf.FieldOptions { |
| 43 | + // Indicates a field which is internal to Spine, not part of the public API, and should not be used by users of the framework. |
| 44 | + // |
| 45 | + // If you plan to implement an extension of the framework, which is going to be |
| 46 | + // wired into the framework, you may use the internal parts. Please consult with the Spine |
| 47 | + // team, as the internal APIs do not have the same stability API guarantee as public ones. |
| 48 | + // |
| 49 | + // See `SPI` option if you plan to write an extension of the framework. |
| 50 | + bool internal = 58000; |
| 51 | + |
| 52 | + // Indicates a file which contains elements of Service Provider Interface (SPI). |
| 53 | + // SPI is used to enable framework extension and replaceable components (implement a new storage, etc). |
| 54 | + // See "Effective Java 2nd Edition", chapter 2, item 1 for more info about service provider framework pattern. |
| 55 | + bool SPI = 58001; |
| 56 | + |
| 57 | + // Indicates a field that can change at any time, and has no guarantee of API stability and backward-compatibility. |
| 58 | + // |
| 59 | + // Usage guidelines: |
| 60 | + // 1. This annotation is used only on public API. Internal interfaces should not use it. |
| 61 | + // 2. This annotation can only be added to new API. Adding it to an existing API is considered API-breaking. |
| 62 | + // 3. Removing this annotation from an API gives it stable status. |
| 63 | + bool experimental = 58002; |
| 64 | + |
| 65 | + // Signifies that a public API is subject to incompatible changes, or even removal, in a future release. |
| 66 | + // An API bearing this annotation is exempt from any compatibility guarantees made by its containing library. |
| 67 | + // Note that the presence of this annotation implies nothing about the quality of the API in question, |
| 68 | + // only the fact that it is not "API-frozen." |
| 69 | + // It is generally safe for applications to depend on beta APIs, at the cost of some extra work during upgrades. |
| 70 | + bool beta = 58003; |
| 71 | +} |
| 72 | + |
| 73 | +extend google.protobuf.MessageOptions { |
| 74 | + // Indicates a file which is internal to Spine, not part of the public API, and should not be used by users of the framework. |
| 75 | + // See more info in `annotations.proto`. |
| 76 | + bool internal_type = 58004; |
| 77 | + |
| 78 | + // Indicates a file which contains elements of Service Provider Interface (SPI). |
| 79 | + // See more info in `annotations.proto`. |
| 80 | + bool SPI_type = 58005; |
| 81 | + |
| 82 | + // Indicates a public API that can change at any time, and has no guarantee of API stability and backward-compatibility. |
| 83 | + // See more info in `annotations.proto`. |
| 84 | + bool experimental_type = 58006; |
| 85 | + |
| 86 | + // Signifies that a public API is subject to incompatible changes, or even removal, in a future release. |
| 87 | + // See more info in `annotations.proto`. |
| 88 | + bool beta_type = 58007; |
| 89 | +} |
| 90 | + |
| 91 | +extend google.protobuf.FileOptions { |
| 92 | + // Indicates a file which should not be used by users of the framework. |
| 93 | + // See more info in `annotations.proto`. |
| 94 | + bool internal_all = 58008; |
| 95 | + |
| 96 | + // Indicates a file which contains elements of Service Provider Interface (SPI). |
| 97 | + // See more info in `annotations.proto`. |
| 98 | + bool SPI_all = 58009; |
| 99 | + |
| 100 | + // Indicates a public API that can change at any time, and has no guarantee of API stability and backward-compatibility. |
| 101 | + // See more info in `annotations.proto`. |
| 102 | + bool experimental_all = 58010; |
| 103 | + |
| 104 | + // Signifies that a public API is subject to incompatible changes, or even removal, in a future release. |
| 105 | + // See more info in `annotations.proto`. |
| 106 | + bool beta_all = 58011; |
| 107 | +} |
0 commit comments