#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateAgentOutput {
pub arn: ::std::string::String,
pub agent_id: ::std::string::String,
pub agent_status: crate::types::AgentStatus,
pub failed_to_add_spaces: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
pub failed_to_remove_spaces: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
pub failed_to_add_action_connectors: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
pub failed_to_remove_action_connectors: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
pub request_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl UpdateAgentOutput {
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn agent_id(&self) -> &str {
use std::ops::Deref;
self.agent_id.deref()
}
pub fn agent_status(&self) -> &crate::types::AgentStatus {
&self.agent_status
}
pub fn failed_to_add_spaces(&self) -> &[crate::types::FailedToUpdateAssociation] {
self.failed_to_add_spaces.as_deref().unwrap_or_default()
}
pub fn failed_to_remove_spaces(&self) -> &[crate::types::FailedToUpdateAssociation] {
self.failed_to_remove_spaces.as_deref().unwrap_or_default()
}
pub fn failed_to_add_action_connectors(&self) -> &[crate::types::FailedToUpdateAssociation] {
self.failed_to_add_action_connectors.as_deref().unwrap_or_default()
}
pub fn failed_to_remove_action_connectors(&self) -> &[crate::types::FailedToUpdateAssociation] {
self.failed_to_remove_action_connectors.as_deref().unwrap_or_default()
}
pub fn request_id(&self) -> ::std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for UpdateAgentOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateAgentOutput {
pub fn builder() -> crate::operation::update_agent::builders::UpdateAgentOutputBuilder {
crate::operation::update_agent::builders::UpdateAgentOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAgentOutputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) agent_id: ::std::option::Option<::std::string::String>,
pub(crate) agent_status: ::std::option::Option<crate::types::AgentStatus>,
pub(crate) failed_to_add_spaces: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
pub(crate) failed_to_remove_spaces: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
pub(crate) failed_to_add_action_connectors: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
pub(crate) failed_to_remove_action_connectors: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
pub(crate) request_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl UpdateAgentOutputBuilder {
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
pub fn agent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_agent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_id = input;
self
}
pub fn get_agent_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_id
}
pub fn agent_status(mut self, input: crate::types::AgentStatus) -> Self {
self.agent_status = ::std::option::Option::Some(input);
self
}
pub fn set_agent_status(mut self, input: ::std::option::Option<crate::types::AgentStatus>) -> Self {
self.agent_status = input;
self
}
pub fn get_agent_status(&self) -> &::std::option::Option<crate::types::AgentStatus> {
&self.agent_status
}
pub fn failed_to_add_spaces(mut self, input: crate::types::FailedToUpdateAssociation) -> Self {
let mut v = self.failed_to_add_spaces.unwrap_or_default();
v.push(input);
self.failed_to_add_spaces = ::std::option::Option::Some(v);
self
}
pub fn set_failed_to_add_spaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>) -> Self {
self.failed_to_add_spaces = input;
self
}
pub fn get_failed_to_add_spaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>> {
&self.failed_to_add_spaces
}
pub fn failed_to_remove_spaces(mut self, input: crate::types::FailedToUpdateAssociation) -> Self {
let mut v = self.failed_to_remove_spaces.unwrap_or_default();
v.push(input);
self.failed_to_remove_spaces = ::std::option::Option::Some(v);
self
}
pub fn set_failed_to_remove_spaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>) -> Self {
self.failed_to_remove_spaces = input;
self
}
pub fn get_failed_to_remove_spaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>> {
&self.failed_to_remove_spaces
}
pub fn failed_to_add_action_connectors(mut self, input: crate::types::FailedToUpdateAssociation) -> Self {
let mut v = self.failed_to_add_action_connectors.unwrap_or_default();
v.push(input);
self.failed_to_add_action_connectors = ::std::option::Option::Some(v);
self
}
pub fn set_failed_to_add_action_connectors(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
) -> Self {
self.failed_to_add_action_connectors = input;
self
}
pub fn get_failed_to_add_action_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>> {
&self.failed_to_add_action_connectors
}
pub fn failed_to_remove_action_connectors(mut self, input: crate::types::FailedToUpdateAssociation) -> Self {
let mut v = self.failed_to_remove_action_connectors.unwrap_or_default();
v.push(input);
self.failed_to_remove_action_connectors = ::std::option::Option::Some(v);
self
}
pub fn set_failed_to_remove_action_connectors(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
) -> Self {
self.failed_to_remove_action_connectors = input;
self
}
pub fn get_failed_to_remove_action_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>> {
&self.failed_to_remove_action_connectors
}
pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.request_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
&self.request_id
}
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::update_agent::UpdateAgentOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_agent::UpdateAgentOutput {
arn: self.arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"arn",
"arn was not specified but it is required when building UpdateAgentOutput",
)
})?,
agent_id: self.agent_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"agent_id",
"agent_id was not specified but it is required when building UpdateAgentOutput",
)
})?,
agent_status: self.agent_status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"agent_status",
"agent_status was not specified but it is required when building UpdateAgentOutput",
)
})?,
failed_to_add_spaces: self.failed_to_add_spaces,
failed_to_remove_spaces: self.failed_to_remove_spaces,
failed_to_add_action_connectors: self.failed_to_add_action_connectors,
failed_to_remove_action_connectors: self.failed_to_remove_action_connectors,
request_id: self.request_id,
_request_id: self._request_id,
})
}
}