Skip to content

Commit

Permalink
Automated Protos Update (#74)
Browse files Browse the repository at this point in the history
Co-authored-by: viambot <[email protected]>
  • Loading branch information
github-actions[bot] and viambot authored Sep 5, 2023
1 parent c4c079e commit 0036a1f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/gen/google.api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,19 @@ pub enum FieldBehavior {
/// a non-empty value will be returned. The user will not be aware of what
/// non-empty value to expect.
NonEmptyDefault = 7,
/// Denotes that the field in a resource (a message annotated with
/// google.api.resource) is used in the resource name to uniquely identify the
/// resource. For AIP-compliant APIs, this should only be applied to the
/// `name` field on the resource.
///
/// This behavior should not be applied to references to other resources within
/// the message.
///
/// The identifier field of resources often have different field behavior
/// depending on the request it is embedded in (e.g. for Create methods name
/// is optional and unused, while for Update methods it is required). Instead
/// of method-specific annotations, only `IDENTIFIER` is required.
Identifier = 8,
}
impl FieldBehavior {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -873,6 +886,7 @@ impl FieldBehavior {
FieldBehavior::Immutable => "IMMUTABLE",
FieldBehavior::UnorderedList => "UNORDERED_LIST",
FieldBehavior::NonEmptyDefault => "NON_EMPTY_DEFAULT",
FieldBehavior::Identifier => "IDENTIFIER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -886,6 +900,7 @@ impl FieldBehavior {
"IMMUTABLE" => Some(Self::Immutable),
"UNORDERED_LIST" => Some(Self::UnorderedList),
"NON_EMPTY_DEFAULT" => Some(Self::NonEmptyDefault),
"IDENTIFIER" => Some(Self::Identifier),
_ => None,
}
}
Expand Down

0 comments on commit 0036a1f

Please sign in to comment.