1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// This file is @generated by prost-build.
/// Logged event relating to a specific secret
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecretEvent {
    /// Resource name of the secret in the format `projects/*/secrets/*`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Type of event that is being logged for the secret
    #[prost(enumeration = "secret_event::EventType", tag = "2")]
    pub r#type: i32,
    /// Human readable message describing the event
    #[prost(string, tag = "3")]
    pub log_message: ::prost::alloc::string::String,
}
/// Nested message and enum types in `SecretEvent`.
pub mod secret_event {
    /// Describes the type of event that is being logged. All logs have exactly one
    /// EventType.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum EventType {
        /// An unrecognized event type. Should never be used.
        Unspecified = 0,
        /// The secret is scheduled to expire in 30 days.
        ExpiresIn30Days = 1,
        /// The secret is scheduled to expire in 7 days.
        ExpiresIn7Days = 2,
        /// The secret is scheduled to expire in 1 day.
        ExpiresIn1Day = 3,
        /// The secret is scheduled to expire in 6 hours.
        ExpiresIn6Hours = 4,
        /// The secret is scheduled to expire in 1 hour.
        ExpiresIn1Hour = 5,
        /// The secret's expire-time has passed and it has expired.
        Expired = 6,
        /// A Pub/Sub topic configured on the secret could not be found.
        TopicNotFound = 7,
        /// A Pub/Sub topic configured on the secret does not have the needed
        /// permissions. The Secret Manager P4SA must be granted
        /// 'pubsub.topic.publish' permission (or 'roles/pubsub.publisher') on the
        /// topic.
        TopicPermissionDenied = 8,
    }
    impl EventType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                EventType::Unspecified => "EVENT_TYPE_UNSPECIFIED",
                EventType::ExpiresIn30Days => "EXPIRES_IN_30_DAYS",
                EventType::ExpiresIn7Days => "EXPIRES_IN_7_DAYS",
                EventType::ExpiresIn1Day => "EXPIRES_IN_1_DAY",
                EventType::ExpiresIn6Hours => "EXPIRES_IN_6_HOURS",
                EventType::ExpiresIn1Hour => "EXPIRES_IN_1_HOUR",
                EventType::Expired => "EXPIRED",
                EventType::TopicNotFound => "TOPIC_NOT_FOUND",
                EventType::TopicPermissionDenied => "TOPIC_PERMISSION_DENIED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "EVENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "EXPIRES_IN_30_DAYS" => Some(Self::ExpiresIn30Days),
                "EXPIRES_IN_7_DAYS" => Some(Self::ExpiresIn7Days),
                "EXPIRES_IN_1_DAY" => Some(Self::ExpiresIn1Day),
                "EXPIRES_IN_6_HOURS" => Some(Self::ExpiresIn6Hours),
                "EXPIRES_IN_1_HOUR" => Some(Self::ExpiresIn1Hour),
                "EXPIRED" => Some(Self::Expired),
                "TOPIC_NOT_FOUND" => Some(Self::TopicNotFound),
                "TOPIC_PERMISSION_DENIED" => Some(Self::TopicPermissionDenied),
                _ => None,
            }
        }
    }
}