aws_sdk_neptunegraph/operation/get_query/
_get_query_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetQueryOutput {
6 pub id: ::std::option::Option<::std::string::String>,
8 pub query_string: ::std::option::Option<::std::string::String>,
10 pub waited: ::std::option::Option<i32>,
12 pub elapsed: ::std::option::Option<i32>,
14 pub state: ::std::option::Option<crate::types::QueryState>,
16 _request_id: Option<String>,
17}
18impl GetQueryOutput {
19 pub fn id(&self) -> ::std::option::Option<&str> {
21 self.id.as_deref()
22 }
23 pub fn query_string(&self) -> ::std::option::Option<&str> {
25 self.query_string.as_deref()
26 }
27 pub fn waited(&self) -> ::std::option::Option<i32> {
29 self.waited
30 }
31 pub fn elapsed(&self) -> ::std::option::Option<i32> {
33 self.elapsed
34 }
35 pub fn state(&self) -> ::std::option::Option<&crate::types::QueryState> {
37 self.state.as_ref()
38 }
39}
40impl ::aws_types::request_id::RequestId for GetQueryOutput {
41 fn request_id(&self) -> Option<&str> {
42 self._request_id.as_deref()
43 }
44}
45impl GetQueryOutput {
46 pub fn builder() -> crate::operation::get_query::builders::GetQueryOutputBuilder {
48 crate::operation::get_query::builders::GetQueryOutputBuilder::default()
49 }
50}
51
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct GetQueryOutputBuilder {
56 pub(crate) id: ::std::option::Option<::std::string::String>,
57 pub(crate) query_string: ::std::option::Option<::std::string::String>,
58 pub(crate) waited: ::std::option::Option<i32>,
59 pub(crate) elapsed: ::std::option::Option<i32>,
60 pub(crate) state: ::std::option::Option<crate::types::QueryState>,
61 _request_id: Option<String>,
62}
63impl GetQueryOutputBuilder {
64 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.id = ::std::option::Option::Some(input.into());
67 self
68 }
69 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.id = input;
72 self
73 }
74 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
76 &self.id
77 }
78 pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 self.query_string = ::std::option::Option::Some(input.into());
81 self
82 }
83 pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.query_string = input;
86 self
87 }
88 pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
90 &self.query_string
91 }
92 pub fn waited(mut self, input: i32) -> Self {
94 self.waited = ::std::option::Option::Some(input);
95 self
96 }
97 pub fn set_waited(mut self, input: ::std::option::Option<i32>) -> Self {
99 self.waited = input;
100 self
101 }
102 pub fn get_waited(&self) -> &::std::option::Option<i32> {
104 &self.waited
105 }
106 pub fn elapsed(mut self, input: i32) -> Self {
108 self.elapsed = ::std::option::Option::Some(input);
109 self
110 }
111 pub fn set_elapsed(mut self, input: ::std::option::Option<i32>) -> Self {
113 self.elapsed = input;
114 self
115 }
116 pub fn get_elapsed(&self) -> &::std::option::Option<i32> {
118 &self.elapsed
119 }
120 pub fn state(mut self, input: crate::types::QueryState) -> Self {
122 self.state = ::std::option::Option::Some(input);
123 self
124 }
125 pub fn set_state(mut self, input: ::std::option::Option<crate::types::QueryState>) -> Self {
127 self.state = input;
128 self
129 }
130 pub fn get_state(&self) -> &::std::option::Option<crate::types::QueryState> {
132 &self.state
133 }
134 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135 self._request_id = Some(request_id.into());
136 self
137 }
138
139 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140 self._request_id = request_id;
141 self
142 }
143 pub fn build(self) -> crate::operation::get_query::GetQueryOutput {
145 crate::operation::get_query::GetQueryOutput {
146 id: self.id,
147 query_string: self.query_string,
148 waited: self.waited,
149 elapsed: self.elapsed,
150 state: self.state,
151 _request_id: self._request_id,
152 }
153 }
154}