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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The properties that are applied when Salesforce is being used as a source.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SalesforceSourceProperties {
/// <p>The object specified in the Salesforce flow source.</p>
pub object: ::std::string::String,
/// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
pub enable_dynamic_field_update: bool,
/// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
pub include_deleted_records: bool,
}
impl SalesforceSourceProperties {
/// <p>The object specified in the Salesforce flow source.</p>
pub fn object(&self) -> &str {
use std::ops::Deref;
self.object.deref()
}
/// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
pub fn enable_dynamic_field_update(&self) -> bool {
self.enable_dynamic_field_update
}
/// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
pub fn include_deleted_records(&self) -> bool {
self.include_deleted_records
}
}
impl SalesforceSourceProperties {
/// Creates a new builder-style object to manufacture [`SalesforceSourceProperties`](crate::types::SalesforceSourceProperties).
pub fn builder() -> crate::types::builders::SalesforceSourcePropertiesBuilder {
crate::types::builders::SalesforceSourcePropertiesBuilder::default()
}
}
/// A builder for [`SalesforceSourceProperties`](crate::types::SalesforceSourceProperties).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SalesforceSourcePropertiesBuilder {
pub(crate) object: ::std::option::Option<::std::string::String>,
pub(crate) enable_dynamic_field_update: ::std::option::Option<bool>,
pub(crate) include_deleted_records: ::std::option::Option<bool>,
}
impl SalesforceSourcePropertiesBuilder {
/// <p>The object specified in the Salesforce flow source.</p>
/// This field is required.
pub fn object(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.object = ::std::option::Option::Some(input.into());
self
}
/// <p>The object specified in the Salesforce flow source.</p>
pub fn set_object(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.object = input;
self
}
/// <p>The object specified in the Salesforce flow source.</p>
pub fn get_object(&self) -> &::std::option::Option<::std::string::String> {
&self.object
}
/// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
pub fn enable_dynamic_field_update(mut self, input: bool) -> Self {
self.enable_dynamic_field_update = ::std::option::Option::Some(input);
self
}
/// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
pub fn set_enable_dynamic_field_update(mut self, input: ::std::option::Option<bool>) -> Self {
self.enable_dynamic_field_update = input;
self
}
/// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
pub fn get_enable_dynamic_field_update(&self) -> &::std::option::Option<bool> {
&self.enable_dynamic_field_update
}
/// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
pub fn include_deleted_records(mut self, input: bool) -> Self {
self.include_deleted_records = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
pub fn set_include_deleted_records(mut self, input: ::std::option::Option<bool>) -> Self {
self.include_deleted_records = input;
self
}
/// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
pub fn get_include_deleted_records(&self) -> &::std::option::Option<bool> {
&self.include_deleted_records
}
/// Consumes the builder and constructs a [`SalesforceSourceProperties`](crate::types::SalesforceSourceProperties).
/// This method will fail if any of the following fields are not set:
/// - [`object`](crate::types::builders::SalesforceSourcePropertiesBuilder::object)
pub fn build(self) -> ::std::result::Result<crate::types::SalesforceSourceProperties, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::SalesforceSourceProperties {
object: self.object.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"object",
"object was not specified but it is required when building SalesforceSourceProperties",
)
})?,
enable_dynamic_field_update: self.enable_dynamic_field_update.unwrap_or_default(),
include_deleted_records: self.include_deleted_records.unwrap_or_default(),
})
}
}