#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetServerDetailsOutput {
pub next_token: ::std::option::Option<::std::string::String>,
pub server_detail: ::std::option::Option<crate::types::ServerDetail>,
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) -> &[crate::types::AssociatedApplication] {
self.associated_applications.as_deref().unwrap_or_default()
}
}
impl ::aws_types::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()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::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 get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
pub fn server_detail(mut self, input: crate::types::ServerDetail) -> Self {
self.server_detail = ::std::option::Option::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 get_server_detail(&self) -> &::std::option::Option<crate::types::ServerDetail> {
&self.server_detail
}
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 = ::std::option::Option::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 fn get_associated_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssociatedApplication>> {
&self.associated_applications
}
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,
}
}
}