aws_sdk_nimble/operation/accept_eulas/
_accept_eulas_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 AcceptEulasInput {
6    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The EULA ID.</p>
9    pub eula_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>The studio ID.</p>
11    pub studio_id: ::std::option::Option<::std::string::String>,
12}
13impl AcceptEulasInput {
14    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
15    pub fn client_token(&self) -> ::std::option::Option<&str> {
16        self.client_token.as_deref()
17    }
18    /// <p>The EULA ID.</p>
19    ///
20    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.eula_ids.is_none()`.
21    pub fn eula_ids(&self) -> &[::std::string::String] {
22        self.eula_ids.as_deref().unwrap_or_default()
23    }
24    /// <p>The studio ID.</p>
25    pub fn studio_id(&self) -> ::std::option::Option<&str> {
26        self.studio_id.as_deref()
27    }
28}
29impl AcceptEulasInput {
30    /// Creates a new builder-style object to manufacture [`AcceptEulasInput`](crate::operation::accept_eulas::AcceptEulasInput).
31    pub fn builder() -> crate::operation::accept_eulas::builders::AcceptEulasInputBuilder {
32        crate::operation::accept_eulas::builders::AcceptEulasInputBuilder::default()
33    }
34}
35
36/// A builder for [`AcceptEulasInput`](crate::operation::accept_eulas::AcceptEulasInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct AcceptEulasInputBuilder {
40    pub(crate) client_token: ::std::option::Option<::std::string::String>,
41    pub(crate) eula_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42    pub(crate) studio_id: ::std::option::Option<::std::string::String>,
43}
44impl AcceptEulasInputBuilder {
45    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
46    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.client_token = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
51    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.client_token = input;
53        self
54    }
55    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
56    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
57        &self.client_token
58    }
59    /// Appends an item to `eula_ids`.
60    ///
61    /// To override the contents of this collection use [`set_eula_ids`](Self::set_eula_ids).
62    ///
63    /// <p>The EULA ID.</p>
64    pub fn eula_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65        let mut v = self.eula_ids.unwrap_or_default();
66        v.push(input.into());
67        self.eula_ids = ::std::option::Option::Some(v);
68        self
69    }
70    /// <p>The EULA ID.</p>
71    pub fn set_eula_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
72        self.eula_ids = input;
73        self
74    }
75    /// <p>The EULA ID.</p>
76    pub fn get_eula_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
77        &self.eula_ids
78    }
79    /// <p>The studio ID.</p>
80    /// This field is required.
81    pub fn studio_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.studio_id = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The studio ID.</p>
86    pub fn set_studio_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.studio_id = input;
88        self
89    }
90    /// <p>The studio ID.</p>
91    pub fn get_studio_id(&self) -> &::std::option::Option<::std::string::String> {
92        &self.studio_id
93    }
94    /// Consumes the builder and constructs a [`AcceptEulasInput`](crate::operation::accept_eulas::AcceptEulasInput).
95    pub fn build(self) -> ::std::result::Result<crate::operation::accept_eulas::AcceptEulasInput, ::aws_smithy_types::error::operation::BuildError> {
96        ::std::result::Result::Ok(crate::operation::accept_eulas::AcceptEulasInput {
97            client_token: self.client_token,
98            eula_ids: self.eula_ids,
99            studio_id: self.studio_id,
100        })
101    }
102}