#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateCollectorOutput {
pub collector_id: ::std::string::String,
pub collector_arn: ::std::string::String,
pub r#type: crate::types::CollectorType,
pub status: crate::types::CollectorStatus,
pub config_recorder_arn: ::std::option::Option<::std::string::String>,
pub kubernetes_cluster_role_arn: ::std::option::Option<::std::string::String>,
pub created_at: ::aws_smithy_types::DateTime,
pub updated_at: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl UpdateCollectorOutput {
pub fn collector_id(&self) -> &str {
use std::ops::Deref;
self.collector_id.deref()
}
pub fn collector_arn(&self) -> &str {
use std::ops::Deref;
self.collector_arn.deref()
}
pub fn r#type(&self) -> &crate::types::CollectorType {
&self.r#type
}
pub fn status(&self) -> &crate::types::CollectorStatus {
&self.status
}
pub fn config_recorder_arn(&self) -> ::std::option::Option<&str> {
self.config_recorder_arn.as_deref()
}
pub fn kubernetes_cluster_role_arn(&self) -> ::std::option::Option<&str> {
self.kubernetes_cluster_role_arn.as_deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
}
impl ::aws_types::request_id::RequestId for UpdateCollectorOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateCollectorOutput {
pub fn builder() -> crate::operation::update_collector::builders::UpdateCollectorOutputBuilder {
crate::operation::update_collector::builders::UpdateCollectorOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCollectorOutputBuilder {
pub(crate) collector_id: ::std::option::Option<::std::string::String>,
pub(crate) collector_arn: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::CollectorType>,
pub(crate) status: ::std::option::Option<crate::types::CollectorStatus>,
pub(crate) config_recorder_arn: ::std::option::Option<::std::string::String>,
pub(crate) kubernetes_cluster_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl UpdateCollectorOutputBuilder {
pub fn collector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.collector_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_collector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.collector_id = input;
self
}
pub fn get_collector_id(&self) -> &::std::option::Option<::std::string::String> {
&self.collector_id
}
pub fn collector_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.collector_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_collector_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.collector_arn = input;
self
}
pub fn get_collector_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.collector_arn
}
pub fn r#type(mut self, input: crate::types::CollectorType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
pub fn set_type(mut self, input: ::std::option::Option<crate::types::CollectorType>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<crate::types::CollectorType> {
&self.r#type
}
pub fn status(mut self, input: crate::types::CollectorStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::CollectorStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::CollectorStatus> {
&self.status
}
pub fn config_recorder_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.config_recorder_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_config_recorder_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.config_recorder_arn = input;
self
}
pub fn get_config_recorder_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.config_recorder_arn
}
pub fn kubernetes_cluster_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kubernetes_cluster_role_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_kubernetes_cluster_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kubernetes_cluster_role_arn = input;
self
}
pub fn get_kubernetes_cluster_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.kubernetes_cluster_role_arn
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
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_collector::UpdateCollectorOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_collector::UpdateCollectorOutput {
collector_id: self.collector_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"collector_id",
"collector_id was not specified but it is required when building UpdateCollectorOutput",
)
})?,
collector_arn: self.collector_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"collector_arn",
"collector_arn was not specified but it is required when building UpdateCollectorOutput",
)
})?,
r#type: self.r#type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"r#type",
"r#type was not specified but it is required when building UpdateCollectorOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building UpdateCollectorOutput",
)
})?,
config_recorder_arn: self.config_recorder_arn,
kubernetes_cluster_role_arn: self.kubernetes_cluster_role_arn,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building UpdateCollectorOutput",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building UpdateCollectorOutput",
)
})?,
_request_id: self._request_id,
})
}
}