aws_sdk_nimble/types/
_eula_acceptance.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The acceptance of a EULA, required to use Amazon-provided streaming images.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EulaAcceptance {
7    /// <p>The ISO timestamp in seconds for when the EULA was accepted.</p>
8    pub accepted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
9    /// <p>The ID of the person who accepted the EULA.</p>
10    pub accepted_by: ::std::option::Option<::std::string::String>,
11    /// <p>The ID of the acceptee.</p>
12    pub acceptee_id: ::std::option::Option<::std::string::String>,
13    /// <p>The EULA acceptance ID.</p>
14    pub eula_acceptance_id: ::std::option::Option<::std::string::String>,
15    /// <p>The EULA ID.</p>
16    pub eula_id: ::std::option::Option<::std::string::String>,
17}
18impl EulaAcceptance {
19    /// <p>The ISO timestamp in seconds for when the EULA was accepted.</p>
20    pub fn accepted_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
21        self.accepted_at.as_ref()
22    }
23    /// <p>The ID of the person who accepted the EULA.</p>
24    pub fn accepted_by(&self) -> ::std::option::Option<&str> {
25        self.accepted_by.as_deref()
26    }
27    /// <p>The ID of the acceptee.</p>
28    pub fn acceptee_id(&self) -> ::std::option::Option<&str> {
29        self.acceptee_id.as_deref()
30    }
31    /// <p>The EULA acceptance ID.</p>
32    pub fn eula_acceptance_id(&self) -> ::std::option::Option<&str> {
33        self.eula_acceptance_id.as_deref()
34    }
35    /// <p>The EULA ID.</p>
36    pub fn eula_id(&self) -> ::std::option::Option<&str> {
37        self.eula_id.as_deref()
38    }
39}
40impl EulaAcceptance {
41    /// Creates a new builder-style object to manufacture [`EulaAcceptance`](crate::types::EulaAcceptance).
42    pub fn builder() -> crate::types::builders::EulaAcceptanceBuilder {
43        crate::types::builders::EulaAcceptanceBuilder::default()
44    }
45}
46
47/// A builder for [`EulaAcceptance`](crate::types::EulaAcceptance).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct EulaAcceptanceBuilder {
51    pub(crate) accepted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
52    pub(crate) accepted_by: ::std::option::Option<::std::string::String>,
53    pub(crate) acceptee_id: ::std::option::Option<::std::string::String>,
54    pub(crate) eula_acceptance_id: ::std::option::Option<::std::string::String>,
55    pub(crate) eula_id: ::std::option::Option<::std::string::String>,
56}
57impl EulaAcceptanceBuilder {
58    /// <p>The ISO timestamp in seconds for when the EULA was accepted.</p>
59    pub fn accepted_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
60        self.accepted_at = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The ISO timestamp in seconds for when the EULA was accepted.</p>
64    pub fn set_accepted_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
65        self.accepted_at = input;
66        self
67    }
68    /// <p>The ISO timestamp in seconds for when the EULA was accepted.</p>
69    pub fn get_accepted_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
70        &self.accepted_at
71    }
72    /// <p>The ID of the person who accepted the EULA.</p>
73    pub fn accepted_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.accepted_by = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The ID of the person who accepted the EULA.</p>
78    pub fn set_accepted_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.accepted_by = input;
80        self
81    }
82    /// <p>The ID of the person who accepted the EULA.</p>
83    pub fn get_accepted_by(&self) -> &::std::option::Option<::std::string::String> {
84        &self.accepted_by
85    }
86    /// <p>The ID of the acceptee.</p>
87    pub fn acceptee_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.acceptee_id = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The ID of the acceptee.</p>
92    pub fn set_acceptee_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.acceptee_id = input;
94        self
95    }
96    /// <p>The ID of the acceptee.</p>
97    pub fn get_acceptee_id(&self) -> &::std::option::Option<::std::string::String> {
98        &self.acceptee_id
99    }
100    /// <p>The EULA acceptance ID.</p>
101    pub fn eula_acceptance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.eula_acceptance_id = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The EULA acceptance ID.</p>
106    pub fn set_eula_acceptance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.eula_acceptance_id = input;
108        self
109    }
110    /// <p>The EULA acceptance ID.</p>
111    pub fn get_eula_acceptance_id(&self) -> &::std::option::Option<::std::string::String> {
112        &self.eula_acceptance_id
113    }
114    /// <p>The EULA ID.</p>
115    pub fn eula_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.eula_id = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The EULA ID.</p>
120    pub fn set_eula_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.eula_id = input;
122        self
123    }
124    /// <p>The EULA ID.</p>
125    pub fn get_eula_id(&self) -> &::std::option::Option<::std::string::String> {
126        &self.eula_id
127    }
128    /// Consumes the builder and constructs a [`EulaAcceptance`](crate::types::EulaAcceptance).
129    pub fn build(self) -> crate::types::EulaAcceptance {
130        crate::types::EulaAcceptance {
131            accepted_at: self.accepted_at,
132            accepted_by: self.accepted_by,
133            acceptee_id: self.acceptee_id,
134            eula_acceptance_id: self.eula_acceptance_id,
135            eula_id: self.eula_id,
136        }
137    }
138}