#[non_exhaustive]pub struct ScaRequestDataAttributesCommit {
pub author_date: Option<String>,
pub author_email: Option<String>,
pub author_name: Option<String>,
pub branch: Option<String>,
pub committer_email: Option<String>,
pub committer_name: Option<String>,
pub sha: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.branch: Option<String>§committer_email: Option<String>§committer_name: Option<String>§sha: Option<String>§additional_properties: BTreeMap<String, Value>Implementations§
Source§impl ScaRequestDataAttributesCommit
impl ScaRequestDataAttributesCommit
Sourcepub fn new() -> ScaRequestDataAttributesCommit
pub fn new() -> ScaRequestDataAttributesCommit
Examples found in repository?
examples/v2_static-analysis_CreateSCAResult.rs (line 29)
21async fn main() {
22 let body =
23 ScaRequest
24 ::new().data(
25 ScaRequestData::new(
26 ScaRequestDataType::SCAREQUESTS,
27 ).attributes(
28 ScaRequestDataAttributes::new()
29 .commit(ScaRequestDataAttributesCommit::new())
30 .dependencies(
31 vec![
32 ScaRequestDataAttributesDependenciesItems::new()
33 .exclusions(vec![])
34 .locations(
35 vec![
36 ScaRequestDataAttributesDependenciesItemsLocationsItems::new()
37 .block(
38 ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition
39 ::new()
40 .end(
41 ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition
42 ::new(),
43 )
44 .start(
45 ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition
46 ::new(),
47 ),
48 )
49 .name(
50 ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition
51 ::new()
52 .end(
53 ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition
54 ::new(),
55 )
56 .start(
57 ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition
58 ::new(),
59 ),
60 )
61 .namespace(
62 ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition
63 ::new()
64 .end(
65 ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition
66 ::new(),
67 )
68 .start(
69 ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition
70 ::new(),
71 ),
72 )
73 .version(
74 ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition
75 ::new()
76 .end(
77 ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition
78 ::new(),
79 )
80 .start(
81 ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition
82 ::new(),
83 ),
84 )
85 ],
86 )
87 .reachable_symbol_properties(
88 vec![
89 ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems::new()
90 ],
91 )
92 ],
93 )
94 .files(vec![ScaRequestDataAttributesFilesItems::new()])
95 .relations(vec![ScaRequestDataAttributesRelationsItems::new().depends_on(vec![])])
96 .repository(ScaRequestDataAttributesRepository::new())
97 .vulnerabilities(
98 vec![
99 ScaRequestDataAttributesVulnerabilitiesItems
100 ::new().affects(vec![ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems::new()])
101 ],
102 ),
103 ),
104 );
105 let mut configuration = datadog::Configuration::new();
106 configuration.set_unstable_operation_enabled("v2.CreateSCAResult", true);
107 let api = StaticAnalysisAPI::with_config(configuration);
108 let resp = api.create_sca_result(body).await;
109 if let Ok(value) = resp {
110 println!("{:#?}", value);
111 } else {
112 println!("{:#?}", resp.unwrap_err());
113 }
114}pub fn branch(self, value: String) -> Self
pub fn committer_email(self, value: String) -> Self
pub fn committer_name(self, value: String) -> Self
pub fn sha(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for ScaRequestDataAttributesCommit
impl Clone for ScaRequestDataAttributesCommit
Source§fn clone(&self) -> ScaRequestDataAttributesCommit
fn clone(&self) -> ScaRequestDataAttributesCommit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for ScaRequestDataAttributesCommit
impl<'de> Deserialize<'de> for ScaRequestDataAttributesCommit
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ScaRequestDataAttributesCommit
impl PartialEq for ScaRequestDataAttributesCommit
Source§fn eq(&self, other: &ScaRequestDataAttributesCommit) -> bool
fn eq(&self, other: &ScaRequestDataAttributesCommit) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ScaRequestDataAttributesCommit
Auto Trait Implementations§
impl Freeze for ScaRequestDataAttributesCommit
impl RefUnwindSafe for ScaRequestDataAttributesCommit
impl Send for ScaRequestDataAttributesCommit
impl Sync for ScaRequestDataAttributesCommit
impl Unpin for ScaRequestDataAttributesCommit
impl UnwindSafe for ScaRequestDataAttributesCommit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more