aws_sdk_appstream/operation/create_entitlement/
_create_entitlement_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateEntitlementInput {
pub name: ::std::option::Option<::std::string::String>,
pub stack_name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub app_visibility: ::std::option::Option<crate::types::AppVisibility>,
pub attributes: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementAttribute>>,
}
impl CreateEntitlementInput {
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) -> &[crate::types::EntitlementAttribute] {
self.attributes.as_deref().unwrap_or_default()
}
}
impl CreateEntitlementInput {
pub fn builder() -> crate::operation::create_entitlement::builders::CreateEntitlementInputBuilder {
crate::operation::create_entitlement::builders::CreateEntitlementInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateEntitlementInputBuilder {
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 CreateEntitlementInputBuilder {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stack_name = ::std::option::Option::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 get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
&self.stack_name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn app_visibility(mut self, input: crate::types::AppVisibility) -> Self {
self.app_visibility = ::std::option::Option::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 get_app_visibility(&self) -> &::std::option::Option<crate::types::AppVisibility> {
&self.app_visibility
}
pub fn attributes(mut self, input: crate::types::EntitlementAttribute) -> Self {
let mut v = self.attributes.unwrap_or_default();
v.push(input);
self.attributes = ::std::option::Option::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 get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EntitlementAttribute>> {
&self.attributes
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_entitlement::CreateEntitlementInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_entitlement::CreateEntitlementInput {
name: self.name,
stack_name: self.stack_name,
description: self.description,
app_visibility: self.app_visibility,
attributes: self.attributes,
})
}
}