@@ -696,6 +696,19 @@ pub struct MethodSettings {
696
696
/// seconds: 54000 # 90 minutes
697
697
#[ prost( message, optional, tag="2" ) ]
698
698
pub long_running : :: core:: option:: Option < method_settings:: LongRunning > ,
699
+ /// List of top-level fields of the request message, that should be
700
+ /// automatically populated by the client libraries based on their
701
+ /// (google.api.field_info).format. Currently supported format: UUID4.
702
+ ///
703
+ /// Example of a YAML configuration:
704
+ ///
705
+ /// publishing:
706
+ /// method_settings:
707
+ /// - selector: google.example.v1.ExampleService.CreateExample
708
+ /// auto_populated_fields:
709
+ /// - request_id
710
+ #[ prost( string, repeated, tag="3" ) ]
711
+ pub auto_populated_fields : :: prost:: alloc:: vec:: Vec < :: prost:: alloc:: string:: String > ,
699
712
}
700
713
/// Nested message and enum types in `MethodSettings`.
701
714
pub mod method_settings {
@@ -857,6 +870,19 @@ pub enum FieldBehavior {
857
870
/// a non-empty value will be returned. The user will not be aware of what
858
871
/// non-empty value to expect.
859
872
NonEmptyDefault = 7 ,
873
+ /// Denotes that the field in a resource (a message annotated with
874
+ /// google.api.resource) is used in the resource name to uniquely identify the
875
+ /// resource. For AIP-compliant APIs, this should only be applied to the
876
+ /// `name` field on the resource.
877
+ ///
878
+ /// This behavior should not be applied to references to other resources within
879
+ /// the message.
880
+ ///
881
+ /// The identifier field of resources often have different field behavior
882
+ /// depending on the request it is embedded in (e.g. for Create methods name
883
+ /// is optional and unused, while for Update methods it is required). Instead
884
+ /// of method-specific annotations, only `IDENTIFIER` is required.
885
+ Identifier = 8 ,
860
886
}
861
887
impl FieldBehavior {
862
888
/// String value of the enum field names used in the ProtoBuf definition.
@@ -873,6 +899,7 @@ impl FieldBehavior {
873
899
FieldBehavior :: Immutable => "IMMUTABLE" ,
874
900
FieldBehavior :: UnorderedList => "UNORDERED_LIST" ,
875
901
FieldBehavior :: NonEmptyDefault => "NON_EMPTY_DEFAULT" ,
902
+ FieldBehavior :: Identifier => "IDENTIFIER" ,
876
903
}
877
904
}
878
905
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -886,6 +913,7 @@ impl FieldBehavior {
886
913
"IMMUTABLE" => Some ( Self :: Immutable ) ,
887
914
"UNORDERED_LIST" => Some ( Self :: UnorderedList ) ,
888
915
"NON_EMPTY_DEFAULT" => Some ( Self :: NonEmptyDefault ) ,
916
+ "IDENTIFIER" => Some ( Self :: Identifier ) ,
889
917
_ => None ,
890
918
}
891
919
}
0 commit comments