#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutProjectEventsInput {
pub project: ::std::option::Option<::std::string::String>,
pub events: ::std::option::Option<::std::vec::Vec<crate::types::Event>>,
}
impl PutProjectEventsInput {
pub fn project(&self) -> ::std::option::Option<&str> {
self.project.as_deref()
}
pub fn events(&self) -> &[crate::types::Event] {
self.events.as_deref().unwrap_or_default()
}
}
impl PutProjectEventsInput {
pub fn builder() -> crate::operation::put_project_events::builders::PutProjectEventsInputBuilder {
crate::operation::put_project_events::builders::PutProjectEventsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutProjectEventsInputBuilder {
pub(crate) project: ::std::option::Option<::std::string::String>,
pub(crate) events: ::std::option::Option<::std::vec::Vec<crate::types::Event>>,
}
impl PutProjectEventsInputBuilder {
pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project = ::std::option::Option::Some(input.into());
self
}
pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project = input;
self
}
pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
&self.project
}
pub fn events(mut self, input: crate::types::Event) -> Self {
let mut v = self.events.unwrap_or_default();
v.push(input);
self.events = ::std::option::Option::Some(v);
self
}
pub fn set_events(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Event>>) -> Self {
self.events = input;
self
}
pub fn get_events(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Event>> {
&self.events
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::put_project_events::PutProjectEventsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::put_project_events::PutProjectEventsInput {
project: self.project,
events: self.events,
})
}
}