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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes the inputs, outputs, and reference data sources for a SQL-based Kinesis Data Analytics application.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SqlApplicationConfigurationDescription {
/// <p>The array of <code>InputDescription</code> objects describing the input streams used by the application.</p>
pub input_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::InputDescription>>,
/// <p>The array of <code>OutputDescription</code> objects describing the destination streams used by the application.</p>
pub output_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::OutputDescription>>,
/// <p>The array of <code>ReferenceDataSourceDescription</code> objects describing the reference data sources used by the application.</p>
pub reference_data_source_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceDataSourceDescription>>,
}
impl SqlApplicationConfigurationDescription {
/// <p>The array of <code>InputDescription</code> objects describing the input streams used by the application.</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 `.input_descriptions.is_none()`.
pub fn input_descriptions(&self) -> &[crate::types::InputDescription] {
self.input_descriptions.as_deref().unwrap_or_default()
}
/// <p>The array of <code>OutputDescription</code> objects describing the destination streams used by the application.</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 `.output_descriptions.is_none()`.
pub fn output_descriptions(&self) -> &[crate::types::OutputDescription] {
self.output_descriptions.as_deref().unwrap_or_default()
}
/// <p>The array of <code>ReferenceDataSourceDescription</code> objects describing the reference data sources used by the application.</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 `.reference_data_source_descriptions.is_none()`.
pub fn reference_data_source_descriptions(&self) -> &[crate::types::ReferenceDataSourceDescription] {
self.reference_data_source_descriptions.as_deref().unwrap_or_default()
}
}
impl SqlApplicationConfigurationDescription {
/// Creates a new builder-style object to manufacture [`SqlApplicationConfigurationDescription`](crate::types::SqlApplicationConfigurationDescription).
pub fn builder() -> crate::types::builders::SqlApplicationConfigurationDescriptionBuilder {
crate::types::builders::SqlApplicationConfigurationDescriptionBuilder::default()
}
}
/// A builder for [`SqlApplicationConfigurationDescription`](crate::types::SqlApplicationConfigurationDescription).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SqlApplicationConfigurationDescriptionBuilder {
pub(crate) input_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::InputDescription>>,
pub(crate) output_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::OutputDescription>>,
pub(crate) reference_data_source_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceDataSourceDescription>>,
}
impl SqlApplicationConfigurationDescriptionBuilder {
/// Appends an item to `input_descriptions`.
///
/// To override the contents of this collection use [`set_input_descriptions`](Self::set_input_descriptions).
///
/// <p>The array of <code>InputDescription</code> objects describing the input streams used by the application.</p>
pub fn input_descriptions(mut self, input: crate::types::InputDescription) -> Self {
let mut v = self.input_descriptions.unwrap_or_default();
v.push(input);
self.input_descriptions = ::std::option::Option::Some(v);
self
}
/// <p>The array of <code>InputDescription</code> objects describing the input streams used by the application.</p>
pub fn set_input_descriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InputDescription>>) -> Self {
self.input_descriptions = input;
self
}
/// <p>The array of <code>InputDescription</code> objects describing the input streams used by the application.</p>
pub fn get_input_descriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputDescription>> {
&self.input_descriptions
}
/// Appends an item to `output_descriptions`.
///
/// To override the contents of this collection use [`set_output_descriptions`](Self::set_output_descriptions).
///
/// <p>The array of <code>OutputDescription</code> objects describing the destination streams used by the application.</p>
pub fn output_descriptions(mut self, input: crate::types::OutputDescription) -> Self {
let mut v = self.output_descriptions.unwrap_or_default();
v.push(input);
self.output_descriptions = ::std::option::Option::Some(v);
self
}
/// <p>The array of <code>OutputDescription</code> objects describing the destination streams used by the application.</p>
pub fn set_output_descriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OutputDescription>>) -> Self {
self.output_descriptions = input;
self
}
/// <p>The array of <code>OutputDescription</code> objects describing the destination streams used by the application.</p>
pub fn get_output_descriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OutputDescription>> {
&self.output_descriptions
}
/// Appends an item to `reference_data_source_descriptions`.
///
/// To override the contents of this collection use [`set_reference_data_source_descriptions`](Self::set_reference_data_source_descriptions).
///
/// <p>The array of <code>ReferenceDataSourceDescription</code> objects describing the reference data sources used by the application.</p>
pub fn reference_data_source_descriptions(mut self, input: crate::types::ReferenceDataSourceDescription) -> Self {
let mut v = self.reference_data_source_descriptions.unwrap_or_default();
v.push(input);
self.reference_data_source_descriptions = ::std::option::Option::Some(v);
self
}
/// <p>The array of <code>ReferenceDataSourceDescription</code> objects describing the reference data sources used by the application.</p>
pub fn set_reference_data_source_descriptions(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceDataSourceDescription>>,
) -> Self {
self.reference_data_source_descriptions = input;
self
}
/// <p>The array of <code>ReferenceDataSourceDescription</code> objects describing the reference data sources used by the application.</p>
pub fn get_reference_data_source_descriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReferenceDataSourceDescription>> {
&self.reference_data_source_descriptions
}
/// Consumes the builder and constructs a [`SqlApplicationConfigurationDescription`](crate::types::SqlApplicationConfigurationDescription).
pub fn build(self) -> crate::types::SqlApplicationConfigurationDescription {
crate::types::SqlApplicationConfigurationDescription {
input_descriptions: self.input_descriptions,
output_descriptions: self.output_descriptions,
reference_data_source_descriptions: self.reference_data_source_descriptions,
}
}
}