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
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reference {
#[prost(message, optional, tag = "1")]
pub referrer: ::core::option::Option<Referrer>,
#[prost(enumeration = "reference::Type", tag = "2")]
pub r#type: i32,
}
/// Nested message and enum types in `Reference`.
pub mod reference {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
ManagedBy = 1,
UsedBy = 2,
}
impl Type {
/// 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 {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::ManagedBy => "MANAGED_BY",
Type::UsedBy => "USED_BY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MANAGED_BY" => Some(Self::ManagedBy),
"USED_BY" => Some(Self::UsedBy),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Referrer {
/// * `type = compute.instance, id = <instance id>`
/// * `type = compute.instanceGroup, id = <instanceGroup id>`
/// * `type = loadbalancer.networkLoadBalancer, id = <networkLoadBalancer id>`
/// * `type = managed-kubernetes.cluster, id = <cluster id>`
/// * `type = managed-mysql.cluster, id = <cluster id>`
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
}