#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeVpcEndpointsOutput {
pub vpc_endpoints: ::std::vec::Vec<crate::types::VpcEndpoint>,
pub vpc_endpoint_errors: ::std::vec::Vec<crate::types::VpcEndpointError>,
_request_id: Option<String>,
}
impl DescribeVpcEndpointsOutput {
pub fn vpc_endpoints(&self) -> &[crate::types::VpcEndpoint] {
use std::ops::Deref;
self.vpc_endpoints.deref()
}
pub fn vpc_endpoint_errors(&self) -> &[crate::types::VpcEndpointError] {
use std::ops::Deref;
self.vpc_endpoint_errors.deref()
}
}
impl ::aws_types::request_id::RequestId for DescribeVpcEndpointsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeVpcEndpointsOutput {
pub fn builder() -> crate::operation::describe_vpc_endpoints::builders::DescribeVpcEndpointsOutputBuilder {
crate::operation::describe_vpc_endpoints::builders::DescribeVpcEndpointsOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeVpcEndpointsOutputBuilder {
pub(crate) vpc_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::VpcEndpoint>>,
pub(crate) vpc_endpoint_errors: ::std::option::Option<::std::vec::Vec<crate::types::VpcEndpointError>>,
_request_id: Option<String>,
}
impl DescribeVpcEndpointsOutputBuilder {
pub fn vpc_endpoints(mut self, input: crate::types::VpcEndpoint) -> Self {
let mut v = self.vpc_endpoints.unwrap_or_default();
v.push(input);
self.vpc_endpoints = ::std::option::Option::Some(v);
self
}
pub fn set_vpc_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcEndpoint>>) -> Self {
self.vpc_endpoints = input;
self
}
pub fn get_vpc_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcEndpoint>> {
&self.vpc_endpoints
}
pub fn vpc_endpoint_errors(mut self, input: crate::types::VpcEndpointError) -> Self {
let mut v = self.vpc_endpoint_errors.unwrap_or_default();
v.push(input);
self.vpc_endpoint_errors = ::std::option::Option::Some(v);
self
}
pub fn set_vpc_endpoint_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcEndpointError>>) -> Self {
self.vpc_endpoint_errors = input;
self
}
pub fn get_vpc_endpoint_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcEndpointError>> {
&self.vpc_endpoint_errors
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::describe_vpc_endpoints::DescribeVpcEndpointsOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::describe_vpc_endpoints::DescribeVpcEndpointsOutput {
vpc_endpoints: self.vpc_endpoints.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"vpc_endpoints",
"vpc_endpoints was not specified but it is required when building DescribeVpcEndpointsOutput",
)
})?,
vpc_endpoint_errors: self.vpc_endpoint_errors.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"vpc_endpoint_errors",
"vpc_endpoint_errors was not specified but it is required when building DescribeVpcEndpointsOutput",
)
})?,
_request_id: self._request_id,
})
}
}