aws_sdk_securityhub/types/
_code_vulnerabilities_file_path.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CodeVulnerabilitiesFilePath {
7 pub end_line: ::std::option::Option<i32>,
9 pub file_name: ::std::option::Option<::std::string::String>,
11 pub file_path: ::std::option::Option<::std::string::String>,
13 pub start_line: ::std::option::Option<i32>,
15}
16impl CodeVulnerabilitiesFilePath {
17 pub fn end_line(&self) -> ::std::option::Option<i32> {
19 self.end_line
20 }
21 pub fn file_name(&self) -> ::std::option::Option<&str> {
23 self.file_name.as_deref()
24 }
25 pub fn file_path(&self) -> ::std::option::Option<&str> {
27 self.file_path.as_deref()
28 }
29 pub fn start_line(&self) -> ::std::option::Option<i32> {
31 self.start_line
32 }
33}
34impl CodeVulnerabilitiesFilePath {
35 pub fn builder() -> crate::types::builders::CodeVulnerabilitiesFilePathBuilder {
37 crate::types::builders::CodeVulnerabilitiesFilePathBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct CodeVulnerabilitiesFilePathBuilder {
45 pub(crate) end_line: ::std::option::Option<i32>,
46 pub(crate) file_name: ::std::option::Option<::std::string::String>,
47 pub(crate) file_path: ::std::option::Option<::std::string::String>,
48 pub(crate) start_line: ::std::option::Option<i32>,
49}
50impl CodeVulnerabilitiesFilePathBuilder {
51 pub fn end_line(mut self, input: i32) -> Self {
53 self.end_line = ::std::option::Option::Some(input);
54 self
55 }
56 pub fn set_end_line(mut self, input: ::std::option::Option<i32>) -> Self {
58 self.end_line = input;
59 self
60 }
61 pub fn get_end_line(&self) -> &::std::option::Option<i32> {
63 &self.end_line
64 }
65 pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.file_name = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.file_name = input;
73 self
74 }
75 pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
77 &self.file_name
78 }
79 pub fn file_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.file_path = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_file_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.file_path = input;
87 self
88 }
89 pub fn get_file_path(&self) -> &::std::option::Option<::std::string::String> {
91 &self.file_path
92 }
93 pub fn start_line(mut self, input: i32) -> Self {
95 self.start_line = ::std::option::Option::Some(input);
96 self
97 }
98 pub fn set_start_line(mut self, input: ::std::option::Option<i32>) -> Self {
100 self.start_line = input;
101 self
102 }
103 pub fn get_start_line(&self) -> &::std::option::Option<i32> {
105 &self.start_line
106 }
107 pub fn build(self) -> crate::types::CodeVulnerabilitiesFilePath {
109 crate::types::CodeVulnerabilitiesFilePath {
110 end_line: self.end_line,
111 file_name: self.file_name,
112 file_path: self.file_path,
113 start_line: self.start_line,
114 }
115 }
116}