aws_sdk_dynamodb/operation/describe_endpoints/
_describe_endpoints_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeEndpointsOutput {
6 pub endpoints: ::std::vec::Vec::<crate::types::Endpoint>,
8 _request_id: Option<String>,
9}
10impl DescribeEndpointsOutput {
11 pub fn endpoints(&self) -> &[crate::types::Endpoint] {
13 use std::ops::Deref; self.endpoints.deref()
14 }
15}
16impl ::aws_types::request_id::RequestId for DescribeEndpointsOutput {
17 fn request_id(&self) -> Option<&str> {
18 self._request_id.as_deref()
19 }
20 }
21impl DescribeEndpointsOutput {
22 pub fn builder() -> crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder {
24 crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder::default()
25 }
26}
27
28#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DescribeEndpointsOutputBuilder {
32 pub(crate) endpoints: ::std::option::Option<::std::vec::Vec::<crate::types::Endpoint>>,
33 _request_id: Option<String>,
34}
35impl DescribeEndpointsOutputBuilder {
36 pub fn endpoints(mut self, input: crate::types::Endpoint) -> Self {
42 let mut v = self.endpoints.unwrap_or_default();
43 v.push(input);
44 self.endpoints = ::std::option::Option::Some(v);
45 self
46 }
47 pub fn set_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::Endpoint>>) -> Self {
49 self.endpoints = input; self
50 }
51 pub fn get_endpoints(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::Endpoint>> {
53 &self.endpoints
54 }
55 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
56 self._request_id = Some(request_id.into());
57 self
58 }
59
60 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
61 self._request_id = request_id;
62 self
63 }
64 pub fn build(self) -> ::std::result::Result<crate::operation::describe_endpoints::DescribeEndpointsOutput, ::aws_smithy_types::error::operation::BuildError> {
68 ::std::result::Result::Ok(
69 crate::operation::describe_endpoints::DescribeEndpointsOutput {
70 endpoints: self.endpoints
71 .ok_or_else(||
72 ::aws_smithy_types::error::operation::BuildError::missing_field("endpoints", "endpoints was not specified but it is required when building DescribeEndpointsOutput")
73 )?
74 ,
75 _request_id: self._request_id,
76 }
77 )
78 }
79}
80