aws_sdk_workspaces/operation/delete_client_branding/
_delete_client_branding_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteClientBrandingInput {
6    /// <p>The directory identifier of the WorkSpace for which you want to delete client branding.</p>
7    pub resource_id: ::std::option::Option<::std::string::String>,
8    /// <p>The device type for which you want to delete client branding.</p>
9    pub platforms: ::std::option::Option<::std::vec::Vec<crate::types::ClientDeviceType>>,
10}
11impl DeleteClientBrandingInput {
12    /// <p>The directory identifier of the WorkSpace for which you want to delete client branding.</p>
13    pub fn resource_id(&self) -> ::std::option::Option<&str> {
14        self.resource_id.as_deref()
15    }
16    /// <p>The device type for which you want to delete client branding.</p>
17    ///
18    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.platforms.is_none()`.
19    pub fn platforms(&self) -> &[crate::types::ClientDeviceType] {
20        self.platforms.as_deref().unwrap_or_default()
21    }
22}
23impl DeleteClientBrandingInput {
24    /// Creates a new builder-style object to manufacture [`DeleteClientBrandingInput`](crate::operation::delete_client_branding::DeleteClientBrandingInput).
25    pub fn builder() -> crate::operation::delete_client_branding::builders::DeleteClientBrandingInputBuilder {
26        crate::operation::delete_client_branding::builders::DeleteClientBrandingInputBuilder::default()
27    }
28}
29
30/// A builder for [`DeleteClientBrandingInput`](crate::operation::delete_client_branding::DeleteClientBrandingInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DeleteClientBrandingInputBuilder {
34    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
35    pub(crate) platforms: ::std::option::Option<::std::vec::Vec<crate::types::ClientDeviceType>>,
36}
37impl DeleteClientBrandingInputBuilder {
38    /// <p>The directory identifier of the WorkSpace for which you want to delete client branding.</p>
39    /// This field is required.
40    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41        self.resource_id = ::std::option::Option::Some(input.into());
42        self
43    }
44    /// <p>The directory identifier of the WorkSpace for which you want to delete client branding.</p>
45    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46        self.resource_id = input;
47        self
48    }
49    /// <p>The directory identifier of the WorkSpace for which you want to delete client branding.</p>
50    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
51        &self.resource_id
52    }
53    /// Appends an item to `platforms`.
54    ///
55    /// To override the contents of this collection use [`set_platforms`](Self::set_platforms).
56    ///
57    /// <p>The device type for which you want to delete client branding.</p>
58    pub fn platforms(mut self, input: crate::types::ClientDeviceType) -> Self {
59        let mut v = self.platforms.unwrap_or_default();
60        v.push(input);
61        self.platforms = ::std::option::Option::Some(v);
62        self
63    }
64    /// <p>The device type for which you want to delete client branding.</p>
65    pub fn set_platforms(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClientDeviceType>>) -> Self {
66        self.platforms = input;
67        self
68    }
69    /// <p>The device type for which you want to delete client branding.</p>
70    pub fn get_platforms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClientDeviceType>> {
71        &self.platforms
72    }
73    /// Consumes the builder and constructs a [`DeleteClientBrandingInput`](crate::operation::delete_client_branding::DeleteClientBrandingInput).
74    pub fn build(
75        self,
76    ) -> ::std::result::Result<crate::operation::delete_client_branding::DeleteClientBrandingInput, ::aws_smithy_types::error::operation::BuildError>
77    {
78        ::std::result::Result::Ok(crate::operation::delete_client_branding::DeleteClientBrandingInput {
79            resource_id: self.resource_id,
80            platforms: self.platforms,
81        })
82    }
83}