#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct DeleteLabelsInput {
pub resource_id: ::std::option::Option<::std::string::String>,
pub authentication_token: ::std::option::Option<::std::string::String>,
pub labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub delete_all: ::std::option::Option<bool>,
}
impl DeleteLabelsInput {
pub fn resource_id(&self) -> ::std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn authentication_token(&self) -> ::std::option::Option<&str> {
self.authentication_token.as_deref()
}
pub fn labels(&self) -> &[::std::string::String] {
self.labels.as_deref().unwrap_or_default()
}
pub fn delete_all(&self) -> ::std::option::Option<bool> {
self.delete_all
}
}
impl ::std::fmt::Debug for DeleteLabelsInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("DeleteLabelsInput");
formatter.field("resource_id", &self.resource_id);
formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
formatter.field("labels", &self.labels);
formatter.field("delete_all", &self.delete_all);
formatter.finish()
}
}
impl DeleteLabelsInput {
pub fn builder() -> crate::operation::delete_labels::builders::DeleteLabelsInputBuilder {
crate::operation::delete_labels::builders::DeleteLabelsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct DeleteLabelsInputBuilder {
pub(crate) resource_id: ::std::option::Option<::std::string::String>,
pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
pub(crate) labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) delete_all: ::std::option::Option<bool>,
}
impl DeleteLabelsInputBuilder {
pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_id
}
pub fn authentication_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.authentication_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_authentication_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.authentication_token = input;
self
}
pub fn get_authentication_token(&self) -> &::std::option::Option<::std::string::String> {
&self.authentication_token
}
pub fn labels(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.labels.unwrap_or_default();
v.push(input.into());
self.labels = ::std::option::Option::Some(v);
self
}
pub fn set_labels(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.labels = input;
self
}
pub fn get_labels(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.labels
}
pub fn delete_all(mut self, input: bool) -> Self {
self.delete_all = ::std::option::Option::Some(input);
self
}
pub fn set_delete_all(mut self, input: ::std::option::Option<bool>) -> Self {
self.delete_all = input;
self
}
pub fn get_delete_all(&self) -> &::std::option::Option<bool> {
&self.delete_all
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::delete_labels::DeleteLabelsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::delete_labels::DeleteLabelsInput {
resource_id: self.resource_id,
authentication_token: self.authentication_token,
labels: self.labels,
delete_all: self.delete_all,
})
}
}
impl ::std::fmt::Debug for DeleteLabelsInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("DeleteLabelsInputBuilder");
formatter.field("resource_id", &self.resource_id);
formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
formatter.field("labels", &self.labels);
formatter.field("delete_all", &self.delete_all);
formatter.finish()
}
}