#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListTagsForResourceOutput {
pub resource_arn: ::std::option::Option<::std::string::String>,
pub resource_tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
_request_id: Option<String>,
}
impl ListTagsForResourceOutput {
pub fn resource_arn(&self) -> ::std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn resource_tags(&self) -> &[crate::types::Tag] {
self.resource_tags.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for ListTagsForResourceOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ListTagsForResourceOutput {
pub fn builder() -> crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder {
crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListTagsForResourceOutputBuilder {
pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
pub(crate) resource_tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
_request_id: Option<String>,
}
impl ListTagsForResourceOutputBuilder {
pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_arn
}
pub fn resource_tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.resource_tags.unwrap_or_default();
v.push(input);
self.resource_tags = ::std::option::Option::Some(v);
self
}
pub fn set_resource_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.resource_tags = input;
self
}
pub fn get_resource_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.resource_tags
}
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::list_tags_for_resource::ListTagsForResourceOutput {
crate::operation::list_tags_for_resource::ListTagsForResourceOutput {
resource_arn: self.resource_arn,
resource_tags: self.resource_tags,
_request_id: self._request_id,
}
}
}