1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutEventsInput {
/// <p>The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.</p>
pub entries: ::std::option::Option<::std::vec::Vec<crate::types::PutEventsRequestEntry>>,
/// <p>The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is <code>abcde.veo</code>.</p> <important>
/// <p>When using Java, you must include <code>auth-crt</code> on the class path.</p>
/// </important>
pub endpoint_id: ::std::option::Option<::std::string::String>,
}
impl PutEventsInput {
/// <p>The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.entries.is_none()`.
pub fn entries(&self) -> &[crate::types::PutEventsRequestEntry] {
self.entries.as_deref().unwrap_or_default()
}
/// <p>The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is <code>abcde.veo</code>.</p> <important>
/// <p>When using Java, you must include <code>auth-crt</code> on the class path.</p>
/// </important>
pub fn endpoint_id(&self) -> ::std::option::Option<&str> {
self.endpoint_id.as_deref()
}
}
impl PutEventsInput {
/// Creates a new builder-style object to manufacture [`PutEventsInput`](crate::operation::put_events::PutEventsInput).
pub fn builder() -> crate::operation::put_events::builders::PutEventsInputBuilder {
crate::operation::put_events::builders::PutEventsInputBuilder::default()
}
}
/// A builder for [`PutEventsInput`](crate::operation::put_events::PutEventsInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PutEventsInputBuilder {
pub(crate) entries: ::std::option::Option<::std::vec::Vec<crate::types::PutEventsRequestEntry>>,
pub(crate) endpoint_id: ::std::option::Option<::std::string::String>,
}
impl PutEventsInputBuilder {
/// Appends an item to `entries`.
///
/// To override the contents of this collection use [`set_entries`](Self::set_entries).
///
/// <p>The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.</p>
pub fn entries(mut self, input: crate::types::PutEventsRequestEntry) -> Self {
let mut v = self.entries.unwrap_or_default();
v.push(input);
self.entries = ::std::option::Option::Some(v);
self
}
/// <p>The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.</p>
pub fn set_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PutEventsRequestEntry>>) -> Self {
self.entries = input;
self
}
/// <p>The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.</p>
pub fn get_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PutEventsRequestEntry>> {
&self.entries
}
/// <p>The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is <code>abcde.veo</code>.</p> <important>
/// <p>When using Java, you must include <code>auth-crt</code> on the class path.</p>
/// </important>
pub fn endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.endpoint_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is <code>abcde.veo</code>.</p> <important>
/// <p>When using Java, you must include <code>auth-crt</code> on the class path.</p>
/// </important>
pub fn set_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.endpoint_id = input;
self
}
/// <p>The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is <code>abcde.veo</code>.</p> <important>
/// <p>When using Java, you must include <code>auth-crt</code> on the class path.</p>
/// </important>
pub fn get_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
&self.endpoint_id
}
/// Consumes the builder and constructs a [`PutEventsInput`](crate::operation::put_events::PutEventsInput).
pub fn build(self) -> ::std::result::Result<crate::operation::put_events::PutEventsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::put_events::PutEventsInput {
entries: self.entries,
endpoint_id: self.endpoint_id,
})
}
}