aws_sdk_appstream/operation/update_entitlement/
_update_entitlement_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateEntitlementInput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub stack_name: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub app_visibility: ::std::option::Option<crate::types::AppVisibility>,
14 pub attributes: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementAttribute>>,
16}
17impl UpdateEntitlementInput {
18 pub fn name(&self) -> ::std::option::Option<&str> {
20 self.name.as_deref()
21 }
22 pub fn stack_name(&self) -> ::std::option::Option<&str> {
24 self.stack_name.as_deref()
25 }
26 pub fn description(&self) -> ::std::option::Option<&str> {
28 self.description.as_deref()
29 }
30 pub fn app_visibility(&self) -> ::std::option::Option<&crate::types::AppVisibility> {
32 self.app_visibility.as_ref()
33 }
34 pub fn attributes(&self) -> &[crate::types::EntitlementAttribute] {
38 self.attributes.as_deref().unwrap_or_default()
39 }
40}
41impl UpdateEntitlementInput {
42 pub fn builder() -> crate::operation::update_entitlement::builders::UpdateEntitlementInputBuilder {
44 crate::operation::update_entitlement::builders::UpdateEntitlementInputBuilder::default()
45 }
46}
47
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct UpdateEntitlementInputBuilder {
52 pub(crate) name: ::std::option::Option<::std::string::String>,
53 pub(crate) stack_name: ::std::option::Option<::std::string::String>,
54 pub(crate) description: ::std::option::Option<::std::string::String>,
55 pub(crate) app_visibility: ::std::option::Option<crate::types::AppVisibility>,
56 pub(crate) attributes: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementAttribute>>,
57}
58impl UpdateEntitlementInputBuilder {
59 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.name = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.name = input;
68 self
69 }
70 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
72 &self.name
73 }
74 pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.stack_name = ::std::option::Option::Some(input.into());
78 self
79 }
80 pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.stack_name = input;
83 self
84 }
85 pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
87 &self.stack_name
88 }
89 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.description = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.description = input;
97 self
98 }
99 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
101 &self.description
102 }
103 pub fn app_visibility(mut self, input: crate::types::AppVisibility) -> Self {
105 self.app_visibility = ::std::option::Option::Some(input);
106 self
107 }
108 pub fn set_app_visibility(mut self, input: ::std::option::Option<crate::types::AppVisibility>) -> Self {
110 self.app_visibility = input;
111 self
112 }
113 pub fn get_app_visibility(&self) -> &::std::option::Option<crate::types::AppVisibility> {
115 &self.app_visibility
116 }
117 pub fn attributes(mut self, input: crate::types::EntitlementAttribute) -> Self {
123 let mut v = self.attributes.unwrap_or_default();
124 v.push(input);
125 self.attributes = ::std::option::Option::Some(v);
126 self
127 }
128 pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementAttribute>>) -> Self {
130 self.attributes = input;
131 self
132 }
133 pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EntitlementAttribute>> {
135 &self.attributes
136 }
137 pub fn build(
139 self,
140 ) -> ::std::result::Result<crate::operation::update_entitlement::UpdateEntitlementInput, ::aws_smithy_types::error::operation::BuildError> {
141 ::std::result::Result::Ok(crate::operation::update_entitlement::UpdateEntitlementInput {
142 name: self.name,
143 stack_name: self.stack_name,
144 description: self.description,
145 app_visibility: self.app_visibility,
146 attributes: self.attributes,
147 })
148 }
149}