#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateEntitlementInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub stack_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub app_visibility: std::option::Option<crate::types::AppVisibility>,
#[doc(hidden)]
pub attributes: std::option::Option<std::vec::Vec<crate::types::EntitlementAttribute>>,
}
impl UpdateEntitlementInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn stack_name(&self) -> std::option::Option<&str> {
self.stack_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn app_visibility(&self) -> std::option::Option<&crate::types::AppVisibility> {
self.app_visibility.as_ref()
}
pub fn attributes(&self) -> std::option::Option<&[crate::types::EntitlementAttribute]> {
self.attributes.as_deref()
}
}
impl UpdateEntitlementInput {
pub fn builder() -> crate::operation::update_entitlement::builders::UpdateEntitlementInputBuilder
{
crate::operation::update_entitlement::builders::UpdateEntitlementInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct UpdateEntitlementInputBuilder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) stack_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) app_visibility: std::option::Option<crate::types::AppVisibility>,
pub(crate) attributes: std::option::Option<std::vec::Vec<crate::types::EntitlementAttribute>>,
}
impl UpdateEntitlementInputBuilder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn stack_name(mut self, input: impl Into<std::string::String>) -> Self {
self.stack_name = Some(input.into());
self
}
pub fn set_stack_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.stack_name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn app_visibility(mut self, input: crate::types::AppVisibility) -> Self {
self.app_visibility = Some(input);
self
}
pub fn set_app_visibility(
mut self,
input: std::option::Option<crate::types::AppVisibility>,
) -> Self {
self.app_visibility = input;
self
}
pub fn attributes(mut self, input: crate::types::EntitlementAttribute) -> Self {
let mut v = self.attributes.unwrap_or_default();
v.push(input);
self.attributes = Some(v);
self
}
pub fn set_attributes(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::EntitlementAttribute>>,
) -> Self {
self.attributes = input;
self
}
pub fn build(
self,
) -> Result<
crate::operation::update_entitlement::UpdateEntitlementInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::operation::update_entitlement::UpdateEntitlementInput {
name: self.name,
stack_name: self.stack_name,
description: self.description,
app_visibility: self.app_visibility,
attributes: self.attributes,
},
)
}
}