#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetServerDetailsOutput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub server_detail: std::option::Option<crate::types::ServerDetail>,
#[doc(hidden)]
pub associated_applications:
std::option::Option<std::vec::Vec<crate::types::AssociatedApplication>>,
_request_id: Option<String>,
}
impl GetServerDetailsOutput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn server_detail(&self) -> std::option::Option<&crate::types::ServerDetail> {
self.server_detail.as_ref()
}
pub fn associated_applications(
&self,
) -> std::option::Option<&[crate::types::AssociatedApplication]> {
self.associated_applications.as_deref()
}
}
impl aws_http::request_id::RequestId for GetServerDetailsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetServerDetailsOutput {
pub fn builder() -> crate::operation::get_server_details::builders::GetServerDetailsOutputBuilder
{
crate::operation::get_server_details::builders::GetServerDetailsOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetServerDetailsOutputBuilder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) server_detail: std::option::Option<crate::types::ServerDetail>,
pub(crate) associated_applications:
std::option::Option<std::vec::Vec<crate::types::AssociatedApplication>>,
_request_id: Option<String>,
}
impl GetServerDetailsOutputBuilder {
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 server_detail(mut self, input: crate::types::ServerDetail) -> Self {
self.server_detail = Some(input);
self
}
pub fn set_server_detail(
mut self,
input: std::option::Option<crate::types::ServerDetail>,
) -> Self {
self.server_detail = input;
self
}
pub fn associated_applications(mut self, input: crate::types::AssociatedApplication) -> Self {
let mut v = self.associated_applications.unwrap_or_default();
v.push(input);
self.associated_applications = Some(v);
self
}
pub fn set_associated_applications(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::AssociatedApplication>>,
) -> Self {
self.associated_applications = input;
self
}
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) -> crate::operation::get_server_details::GetServerDetailsOutput {
crate::operation::get_server_details::GetServerDetailsOutput {
next_token: self.next_token,
server_detail: self.server_detail,
associated_applications: self.associated_applications,
_request_id: self._request_id,
}
}
}