aws_sdk_xray/types/
_response_time_root_cause_service.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ResponseTimeRootCauseService {
7 pub name: ::std::option::Option<::std::string::String>,
9 pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11 pub r#type: ::std::option::Option<::std::string::String>,
13 pub account_id: ::std::option::Option<::std::string::String>,
15 pub entity_path: ::std::option::Option<::std::vec::Vec<crate::types::ResponseTimeRootCauseEntity>>,
17 pub inferred: ::std::option::Option<bool>,
19}
20impl ResponseTimeRootCauseService {
21 pub fn name(&self) -> ::std::option::Option<&str> {
23 self.name.as_deref()
24 }
25 pub fn names(&self) -> &[::std::string::String] {
29 self.names.as_deref().unwrap_or_default()
30 }
31 pub fn r#type(&self) -> ::std::option::Option<&str> {
33 self.r#type.as_deref()
34 }
35 pub fn account_id(&self) -> ::std::option::Option<&str> {
37 self.account_id.as_deref()
38 }
39 pub fn entity_path(&self) -> &[crate::types::ResponseTimeRootCauseEntity] {
43 self.entity_path.as_deref().unwrap_or_default()
44 }
45 pub fn inferred(&self) -> ::std::option::Option<bool> {
47 self.inferred
48 }
49}
50impl ResponseTimeRootCauseService {
51 pub fn builder() -> crate::types::builders::ResponseTimeRootCauseServiceBuilder {
53 crate::types::builders::ResponseTimeRootCauseServiceBuilder::default()
54 }
55}
56
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
59#[non_exhaustive]
60pub struct ResponseTimeRootCauseServiceBuilder {
61 pub(crate) name: ::std::option::Option<::std::string::String>,
62 pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
63 pub(crate) r#type: ::std::option::Option<::std::string::String>,
64 pub(crate) account_id: ::std::option::Option<::std::string::String>,
65 pub(crate) entity_path: ::std::option::Option<::std::vec::Vec<crate::types::ResponseTimeRootCauseEntity>>,
66 pub(crate) inferred: ::std::option::Option<bool>,
67}
68impl ResponseTimeRootCauseServiceBuilder {
69 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.name = ::std::option::Option::Some(input.into());
72 self
73 }
74 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.name = input;
77 self
78 }
79 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
81 &self.name
82 }
83 pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 let mut v = self.names.unwrap_or_default();
90 v.push(input.into());
91 self.names = ::std::option::Option::Some(v);
92 self
93 }
94 pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
96 self.names = input;
97 self
98 }
99 pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
101 &self.names
102 }
103 pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.r#type = ::std::option::Option::Some(input.into());
106 self
107 }
108 pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.r#type = input;
111 self
112 }
113 pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
115 &self.r#type
116 }
117 pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.account_id = ::std::option::Option::Some(input.into());
120 self
121 }
122 pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.account_id = input;
125 self
126 }
127 pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
129 &self.account_id
130 }
131 pub fn entity_path(mut self, input: crate::types::ResponseTimeRootCauseEntity) -> Self {
137 let mut v = self.entity_path.unwrap_or_default();
138 v.push(input);
139 self.entity_path = ::std::option::Option::Some(v);
140 self
141 }
142 pub fn set_entity_path(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResponseTimeRootCauseEntity>>) -> Self {
144 self.entity_path = input;
145 self
146 }
147 pub fn get_entity_path(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResponseTimeRootCauseEntity>> {
149 &self.entity_path
150 }
151 pub fn inferred(mut self, input: bool) -> Self {
153 self.inferred = ::std::option::Option::Some(input);
154 self
155 }
156 pub fn set_inferred(mut self, input: ::std::option::Option<bool>) -> Self {
158 self.inferred = input;
159 self
160 }
161 pub fn get_inferred(&self) -> &::std::option::Option<bool> {
163 &self.inferred
164 }
165 pub fn build(self) -> crate::types::ResponseTimeRootCauseService {
167 crate::types::ResponseTimeRootCauseService {
168 name: self.name,
169 names: self.names,
170 r#type: self.r#type,
171 account_id: self.account_id,
172 entity_path: self.entity_path,
173 inferred: self.inferred,
174 }
175 }
176}