logging.proto 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. // Copyright 2021 Google LLC
  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.cloud.gkebackup.logging.v1;
  16. import "google/cloud/gkebackup/logging/v1/logged_backup.proto";
  17. import "google/cloud/gkebackup/logging/v1/logged_backup_plan.proto";
  18. import "google/cloud/gkebackup/logging/v1/logged_restore.proto";
  19. import "google/cloud/gkebackup/logging/v1/logged_restore_plan.proto";
  20. import "google/protobuf/field_mask.proto";
  21. import "google/rpc/status.proto";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/gkebackup/logging/v1;logging";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "LoggingProto";
  25. option java_package = "google.cloud.gkebackup.logging.v1";
  26. option csharp_namespace = "Google.Cloud.GkeBackup.Logging.V1";
  27. option php_namespace = "Google\\Cloud\\GkeBackup\\Logging\\V1";
  28. option ruby_package = "Google::Cloud::GkeBackup::Logging::V1";
  29. // use case 1
  30. // A log entry when modification(creation, update, deletion) is made to a
  31. // BackupPlan
  32. message BackupPlanChange {
  33. // The full name of the old BackupPlan resource that is being modified.
  34. // Empty for creation.
  35. // Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}
  36. string backup_plan = 1;
  37. // Type of the change is being made.
  38. ChangeType change_type = 2;
  39. // Modification details.
  40. google.protobuf.FieldMask update_mask = 3;
  41. // The input BackupPlan resource with the updated fields populated to update
  42. // the source BackupPlan to.
  43. LoggedBackupPlan input_backup_plan = 4;
  44. // The error code and message.
  45. google.rpc.Status error = 5;
  46. }
  47. // use case 2
  48. // A log entry when modification(creation, update, deletion) is made to a
  49. // Backup
  50. message BackupChange {
  51. // The full name of the Backup resource that is being modified.
  52. // Format:
  53. // projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
  54. string backup = 1;
  55. // Type of the change is being made.
  56. ChangeType change_type = 2;
  57. // Whether the change is made manually or automatically.
  58. bool scheduled = 3;
  59. // Modification details.
  60. google.protobuf.FieldMask update_mask = 4;
  61. // The input Backup resource with the updated fields populated to update
  62. // the source Backup to, or the backup created automatically from retention
  63. // policy.
  64. LoggedBackup input_backup = 5;
  65. // The error code and message.
  66. google.rpc.Status error = 6;
  67. }
  68. // use case 3
  69. // A log entry when modification(creation, update, deletion) is made to a
  70. // restorePlan.
  71. message RestorePlanChange {
  72. // The full name of the RestorePlan resource that is being modified.
  73. // Empty for creation.
  74. // Format: projects/*/locations/*/restorePlans/*
  75. string restore_plan = 1;
  76. // Type of the change is being made.
  77. ChangeType change_type = 2;
  78. // Modification details.
  79. google.protobuf.FieldMask update_mask = 3;
  80. // The input RestorePlan resource with the updated fields populated to update
  81. // the source RestorePlan to.
  82. LoggedRestorePlan input_restore_plan = 4;
  83. // The error code and message.
  84. google.rpc.Status error = 5;
  85. }
  86. // use case 4
  87. // A log entry when modification(creation, update, deletion) is made to a
  88. // restore.
  89. message RestoreChange {
  90. // The full name of the Restore resource that is being modified.
  91. // Empty for creation.
  92. // Format: projects/*/locations/*/restorePlans/*/restores/*
  93. string restore = 1;
  94. // Type of the change is being made.
  95. ChangeType change_type = 2;
  96. // Modification details.
  97. google.protobuf.FieldMask update_mask = 3;
  98. // The input Restore resource with the updated fields populated to update
  99. // the source Restore to.
  100. LoggedRestore input_restore = 4;
  101. // The error code and message.
  102. google.rpc.Status error = 5;
  103. }
  104. // The type of changes this log is about.
  105. enum ChangeType {
  106. // Default value, not specified.
  107. CHANGE_TYPE_UNSPECIFIED = 0;
  108. // The resource is created.
  109. CREATION = 1;
  110. // The resource is updated.
  111. UPDATE = 2;
  112. // The resource is deleted.
  113. DELETION = 3;
  114. }