use std::fmt::Write;
pub mod create_endpoint_input {
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) outpost_id: std::option::Option<std::string::String>,
pub(crate) subnet_id: std::option::Option<std::string::String>,
pub(crate) security_group_id: std::option::Option<std::string::String>,
pub(crate) access_type: std::option::Option<crate::model::EndpointAccessType>,
pub(crate) customer_owned_ipv4_pool: std::option::Option<std::string::String>,
}
impl Builder {
pub fn outpost_id(mut self, input: impl Into<std::string::String>) -> Self {
self.outpost_id = Some(input.into());
self
}
pub fn set_outpost_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.outpost_id = input;
self
}
pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.subnet_id = Some(input.into());
self
}
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.subnet_id = input;
self
}
pub fn security_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.security_group_id = Some(input.into());
self
}
pub fn set_security_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.security_group_id = input;
self
}
pub fn access_type(mut self, input: crate::model::EndpointAccessType) -> Self {
self.access_type = Some(input);
self
}
pub fn set_access_type(
mut self,
input: std::option::Option<crate::model::EndpointAccessType>,
) -> Self {
self.access_type = input;
self
}
pub fn customer_owned_ipv4_pool(mut self, input: impl Into<std::string::String>) -> Self {
self.customer_owned_ipv4_pool = Some(input.into());
self
}
pub fn set_customer_owned_ipv4_pool(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.customer_owned_ipv4_pool = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateEndpointInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::CreateEndpointInput {
outpost_id: self.outpost_id,
subnet_id: self.subnet_id,
security_group_id: self.security_group_id,
access_type: self.access_type,
customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
})
}
}
}
#[doc(hidden)]
pub type CreateEndpointInputOperationOutputAlias = crate::operation::CreateEndpoint;
#[doc(hidden)]
pub type CreateEndpointInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateEndpointInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateEndpoint,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateEndpointInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/S3Outposts/CreateEndpoint").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateEndpointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_endpoint(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
let endpoint_params = aws_endpoint::Params::new(_config.region.clone());
request
.properties_mut()
.insert::<aws_smithy_http::endpoint::Result>(
_config.endpoint_resolver.resolve_endpoint(&endpoint_params),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateEndpoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateEndpoint",
"s3outposts",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_endpoint_input::Builder {
crate::input::create_endpoint_input::Builder::default()
}
}
pub mod delete_endpoint_input {
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_id: std::option::Option<std::string::String>,
pub(crate) outpost_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_id = Some(input.into());
self
}
pub fn set_endpoint_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_id = input;
self
}
pub fn outpost_id(mut self, input: impl Into<std::string::String>) -> Self {
self.outpost_id = Some(input.into());
self
}
pub fn set_outpost_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.outpost_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteEndpointInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::DeleteEndpointInput {
endpoint_id: self.endpoint_id,
outpost_id: self.outpost_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteEndpointInputOperationOutputAlias = crate::operation::DeleteEndpoint;
#[doc(hidden)]
pub type DeleteEndpointInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteEndpointInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteEndpoint,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteEndpointInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/S3Outposts/DeleteEndpoint").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteEndpointInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_1) = &_input.endpoint_id {
query.push_kv("endpointId", &aws_smithy_http::query::fmt_string(&inner_1));
}
if let Some(inner_2) = &_input.outpost_id {
query.push_kv("outpostId", &aws_smithy_http::query::fmt_string(&inner_2));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteEndpointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
let endpoint_params = aws_endpoint::Params::new(_config.region.clone());
request
.properties_mut()
.insert::<aws_smithy_http::endpoint::Result>(
_config.endpoint_resolver.resolve_endpoint(&endpoint_params),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteEndpoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteEndpoint",
"s3outposts",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_endpoint_input::Builder {
crate::input::delete_endpoint_input::Builder::default()
}
}
pub mod list_endpoints_input {
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListEndpointsInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::ListEndpointsInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
#[doc(hidden)]
pub type ListEndpointsInputOperationOutputAlias = crate::operation::ListEndpoints;
#[doc(hidden)]
pub type ListEndpointsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListEndpointsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListEndpoints,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListEndpointsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/S3Outposts/ListEndpoints").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListEndpointsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_3) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_3));
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEndpointsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
let endpoint_params = aws_endpoint::Params::new(_config.region.clone());
request
.properties_mut()
.insert::<aws_smithy_http::endpoint::Result>(
_config.endpoint_resolver.resolve_endpoint(&endpoint_params),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEndpoints::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEndpoints",
"s3outposts",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_endpoints_input::Builder {
crate::input::list_endpoints_input::Builder::default()
}
}
pub mod list_shared_endpoints_input {
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) outpost_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn outpost_id(mut self, input: impl Into<std::string::String>) -> Self {
self.outpost_id = Some(input.into());
self
}
pub fn set_outpost_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.outpost_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListSharedEndpointsInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::ListSharedEndpointsInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
outpost_id: self.outpost_id,
})
}
}
}
#[doc(hidden)]
pub type ListSharedEndpointsInputOperationOutputAlias = crate::operation::ListSharedEndpoints;
#[doc(hidden)]
pub type ListSharedEndpointsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListSharedEndpointsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListSharedEndpoints,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListSharedEndpointsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/S3Outposts/ListSharedEndpoints")
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListSharedEndpointsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_4) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_4));
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_5) = &_input.outpost_id {
query.push_kv("outpostId", &aws_smithy_http::query::fmt_string(&inner_5));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListSharedEndpointsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
let endpoint_params = aws_endpoint::Params::new(_config.region.clone());
request
.properties_mut()
.insert::<aws_smithy_http::endpoint::Result>(
_config.endpoint_resolver.resolve_endpoint(&endpoint_params),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListSharedEndpoints::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListSharedEndpoints",
"s3outposts",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_shared_endpoints_input::Builder {
crate::input::list_shared_endpoints_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListSharedEndpointsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub outpost_id: std::option::Option<std::string::String>,
}
impl ListSharedEndpointsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn outpost_id(&self) -> std::option::Option<&str> {
self.outpost_id.as_deref()
}
}
impl std::fmt::Debug for ListSharedEndpointsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListSharedEndpointsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.field("outpost_id", &self.outpost_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListEndpointsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListEndpointsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
impl std::fmt::Debug for ListEndpointsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListEndpointsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteEndpointInput {
#[doc(hidden)]
pub endpoint_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub outpost_id: std::option::Option<std::string::String>,
}
impl DeleteEndpointInput {
pub fn endpoint_id(&self) -> std::option::Option<&str> {
self.endpoint_id.as_deref()
}
pub fn outpost_id(&self) -> std::option::Option<&str> {
self.outpost_id.as_deref()
}
}
impl std::fmt::Debug for DeleteEndpointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteEndpointInput");
formatter.field("endpoint_id", &self.endpoint_id);
formatter.field("outpost_id", &self.outpost_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateEndpointInput {
#[doc(hidden)]
pub outpost_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub subnet_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub security_group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub access_type: std::option::Option<crate::model::EndpointAccessType>,
#[doc(hidden)]
pub customer_owned_ipv4_pool: std::option::Option<std::string::String>,
}
impl CreateEndpointInput {
pub fn outpost_id(&self) -> std::option::Option<&str> {
self.outpost_id.as_deref()
}
pub fn subnet_id(&self) -> std::option::Option<&str> {
self.subnet_id.as_deref()
}
pub fn security_group_id(&self) -> std::option::Option<&str> {
self.security_group_id.as_deref()
}
pub fn access_type(&self) -> std::option::Option<&crate::model::EndpointAccessType> {
self.access_type.as_ref()
}
pub fn customer_owned_ipv4_pool(&self) -> std::option::Option<&str> {
self.customer_owned_ipv4_pool.as_deref()
}
}
impl std::fmt::Debug for CreateEndpointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateEndpointInput");
formatter.field("outpost_id", &self.outpost_id);
formatter.field("subnet_id", &self.subnet_id);
formatter.field("security_group_id", &self.security_group_id);
formatter.field("access_type", &self.access_type);
formatter.field("customer_owned_ipv4_pool", &self.customer_owned_ipv4_pool);
formatter.finish()
}
}