aws_sdk_fis/types/
_experiment_target_filter.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ExperimentTargetFilter {
7 pub path: ::std::option::Option<::std::string::String>,
9 pub values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11}
12impl ExperimentTargetFilter {
13 pub fn path(&self) -> ::std::option::Option<&str> {
15 self.path.as_deref()
16 }
17 pub fn values(&self) -> &[::std::string::String] {
21 self.values.as_deref().unwrap_or_default()
22 }
23}
24impl ExperimentTargetFilter {
25 pub fn builder() -> crate::types::builders::ExperimentTargetFilterBuilder {
27 crate::types::builders::ExperimentTargetFilterBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct ExperimentTargetFilterBuilder {
35 pub(crate) path: ::std::option::Option<::std::string::String>,
36 pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
37}
38impl ExperimentTargetFilterBuilder {
39 pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.path = ::std::option::Option::Some(input.into());
42 self
43 }
44 pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.path = input;
47 self
48 }
49 pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
51 &self.path
52 }
53 pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 let mut v = self.values.unwrap_or_default();
60 v.push(input.into());
61 self.values = ::std::option::Option::Some(v);
62 self
63 }
64 pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
66 self.values = input;
67 self
68 }
69 pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
71 &self.values
72 }
73 pub fn build(self) -> crate::types::ExperimentTargetFilter {
75 crate::types::ExperimentTargetFilter {
76 path: self.path,
77 values: self.values,
78 }
79 }
80}