config_change.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // Copyright 2016 Google Inc.
  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. syntax = "proto3";
  15. package google.api;
  16. option java_multiple_files = true;
  17. option java_outer_classname = "ConfigChangeProto";
  18. option java_package = "com.google.api";
  19. option objc_class_prefix = "GAPI";
  20. // Output generated from semantically comparing two versions of a service
  21. // configuration.
  22. //
  23. // Includes detailed information about a field that have changed with
  24. // applicable advice about potential consequences for the change, such as
  25. // backwards-incompatibility.
  26. message ConfigChange {
  27. // Object hierarchy path to the change, with levels separated by a '.'
  28. // character. For repeated fields, an applicable unique identifier field is
  29. // used for the index (usually selector, name, or id). For maps, the term
  30. // 'key' is used. If the field has no unique identifier, the numeric index
  31. // is used.
  32. // Examples:
  33. // - visibility.rules[selector=="google.LibraryService.CreateBook"].restriction
  34. // - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
  35. // - logging.producer_destinations[0]
  36. string element = 1;
  37. // Value of the changed object in the old Service configuration,
  38. // in JSON format. This field will not be populated if ChangeType == ADDED.
  39. string old_value = 2;
  40. // Value of the changed object in the new Service configuration,
  41. // in JSON format. This field will not be populated if ChangeType == REMOVED.
  42. string new_value = 3;
  43. // The type for this change, either ADDED, REMOVED, or MODIFIED.
  44. ChangeType change_type = 4;
  45. // Collection of advice provided for this change, useful for determining the
  46. // possible impact of this change.
  47. repeated Advice advices = 5;
  48. }
  49. // Generated advice about this change, used for providing more
  50. // information about how a change will affect the existing service.
  51. message Advice {
  52. // Useful description for why this advice was applied and what actions should
  53. // be taken to mitigate any implied risks.
  54. string description = 2;
  55. }
  56. // Classifies set of possible modifications to an object in the service
  57. // configuration.
  58. enum ChangeType {
  59. // No value was provided.
  60. CHANGE_TYPE_UNSPECIFIED = 0;
  61. // The changed object exists in the 'new' service configuration, but not
  62. // in the 'old' service configuration.
  63. ADDED = 1;
  64. // The changed object exists in the 'old' service configuration, but not
  65. // in the 'new' service configuration.
  66. REMOVED = 2;
  67. // The changed object exists in both service configurations, but its value
  68. // is different.
  69. MODIFIED = 3;
  70. }