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;
14 self.endpoints.deref()
15 }
16}
17impl ::aws_types::request_id::RequestId for DescribeEndpointsOutput {
18 fn request_id(&self) -> Option<&str> {
19 self._request_id.as_deref()
20 }
21}
22impl DescribeEndpointsOutput {
23 pub fn builder() -> crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder {
25 crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DescribeEndpointsOutputBuilder {
33 pub(crate) endpoints: ::std::option::Option<::std::vec::Vec<crate::types::Endpoint>>,
34 _request_id: Option<String>,
35}
36impl DescribeEndpointsOutputBuilder {
37 pub fn endpoints(mut self, input: crate::types::Endpoint) -> Self {
43 let mut v = self.endpoints.unwrap_or_default();
44 v.push(input);
45 self.endpoints = ::std::option::Option::Some(v);
46 self
47 }
48 pub fn set_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Endpoint>>) -> Self {
50 self.endpoints = input;
51 self
52 }
53 pub fn get_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Endpoint>> {
55 &self.endpoints
56 }
57 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
58 self._request_id = Some(request_id.into());
59 self
60 }
61
62 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
63 self._request_id = request_id;
64 self
65 }
66 pub fn build(
70 self,
71 ) -> ::std::result::Result<crate::operation::describe_endpoints::DescribeEndpointsOutput, ::aws_smithy_types::error::operation::BuildError> {
72 ::std::result::Result::Ok(crate::operation::describe_endpoints::DescribeEndpointsOutput {
73 endpoints: self.endpoints.ok_or_else(|| {
74 ::aws_smithy_types::error::operation::BuildError::missing_field(
75 "endpoints",
76 "endpoints was not specified but it is required when building DescribeEndpointsOutput",
77 )
78 })?,
79 _request_id: self._request_id,
80 })
81 }
82}