aws_sdk_appflow/types/_salesforce_source_properties.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The properties that are applied when Salesforce is being used as a source.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SalesforceSourceProperties {
7 /// <p>The object specified in the Salesforce flow source.</p>
8 pub object: ::std::string::String,
9 /// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
10 pub enable_dynamic_field_update: bool,
11 /// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
12 pub include_deleted_records: bool,
13 /// <p>Specifies which Salesforce API is used by Amazon AppFlow when your flow transfers data from Salesforce.</p>
14 /// <dl>
15 /// <dt>
16 /// AUTOMATIC
17 /// </dt>
18 /// <dd>
19 /// <p>The default. Amazon AppFlow selects which API to use based on the number of records that your flow transfers from Salesforce. If your flow transfers fewer than 1,000,000 records, Amazon AppFlow uses Salesforce REST API. If your flow transfers 1,000,000 records or more, Amazon AppFlow uses Salesforce Bulk API 2.0.</p>
20 /// <p>Each of these Salesforce APIs structures data differently. If Amazon AppFlow selects the API automatically, be aware that, for recurring flows, the data output might vary from one flow run to the next. For example, if a flow runs daily, it might use REST API on one day to transfer 900,000 records, and it might use Bulk API 2.0 on the next day to transfer 1,100,000 records. For each of these flow runs, the respective Salesforce API formats the data differently. Some of the differences include how dates are formatted and null values are represented. Also, Bulk API 2.0 doesn't transfer Salesforce compound fields.</p>
21 /// <p>By choosing this option, you optimize flow performance for both small and large data transfers, but the tradeoff is inconsistent formatting in the output.</p>
22 /// </dd>
23 /// <dt>
24 /// BULKV2
25 /// </dt>
26 /// <dd>
27 /// <p>Amazon AppFlow uses only Salesforce Bulk API 2.0. This API runs asynchronous data transfers, and it's optimal for large sets of data. By choosing this option, you ensure that your flow writes consistent output, but you optimize performance only for large data transfers.</p>
28 /// <p>Note that Bulk API 2.0 does not transfer Salesforce compound fields.</p>
29 /// </dd>
30 /// <dt>
31 /// REST_SYNC
32 /// </dt>
33 /// <dd>
34 /// <p>Amazon AppFlow uses only Salesforce REST API. By choosing this option, you ensure that your flow writes consistent output, but you decrease performance for large data transfers that are better suited for Bulk API 2.0. In some cases, if your flow attempts to transfer a vary large set of data, it might fail wituh a timed out error.</p>
35 /// </dd>
36 /// </dl>
37 pub data_transfer_api: ::std::option::Option<crate::types::SalesforceDataTransferApi>,
38}
39impl SalesforceSourceProperties {
40 /// <p>The object specified in the Salesforce flow source.</p>
41 pub fn object(&self) -> &str {
42 use std::ops::Deref;
43 self.object.deref()
44 }
45 /// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
46 pub fn enable_dynamic_field_update(&self) -> bool {
47 self.enable_dynamic_field_update
48 }
49 /// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
50 pub fn include_deleted_records(&self) -> bool {
51 self.include_deleted_records
52 }
53 /// <p>Specifies which Salesforce API is used by Amazon AppFlow when your flow transfers data from Salesforce.</p>
54 /// <dl>
55 /// <dt>
56 /// AUTOMATIC
57 /// </dt>
58 /// <dd>
59 /// <p>The default. Amazon AppFlow selects which API to use based on the number of records that your flow transfers from Salesforce. If your flow transfers fewer than 1,000,000 records, Amazon AppFlow uses Salesforce REST API. If your flow transfers 1,000,000 records or more, Amazon AppFlow uses Salesforce Bulk API 2.0.</p>
60 /// <p>Each of these Salesforce APIs structures data differently. If Amazon AppFlow selects the API automatically, be aware that, for recurring flows, the data output might vary from one flow run to the next. For example, if a flow runs daily, it might use REST API on one day to transfer 900,000 records, and it might use Bulk API 2.0 on the next day to transfer 1,100,000 records. For each of these flow runs, the respective Salesforce API formats the data differently. Some of the differences include how dates are formatted and null values are represented. Also, Bulk API 2.0 doesn't transfer Salesforce compound fields.</p>
61 /// <p>By choosing this option, you optimize flow performance for both small and large data transfers, but the tradeoff is inconsistent formatting in the output.</p>
62 /// </dd>
63 /// <dt>
64 /// BULKV2
65 /// </dt>
66 /// <dd>
67 /// <p>Amazon AppFlow uses only Salesforce Bulk API 2.0. This API runs asynchronous data transfers, and it's optimal for large sets of data. By choosing this option, you ensure that your flow writes consistent output, but you optimize performance only for large data transfers.</p>
68 /// <p>Note that Bulk API 2.0 does not transfer Salesforce compound fields.</p>
69 /// </dd>
70 /// <dt>
71 /// REST_SYNC
72 /// </dt>
73 /// <dd>
74 /// <p>Amazon AppFlow uses only Salesforce REST API. By choosing this option, you ensure that your flow writes consistent output, but you decrease performance for large data transfers that are better suited for Bulk API 2.0. In some cases, if your flow attempts to transfer a vary large set of data, it might fail wituh a timed out error.</p>
75 /// </dd>
76 /// </dl>
77 pub fn data_transfer_api(&self) -> ::std::option::Option<&crate::types::SalesforceDataTransferApi> {
78 self.data_transfer_api.as_ref()
79 }
80}
81impl SalesforceSourceProperties {
82 /// Creates a new builder-style object to manufacture [`SalesforceSourceProperties`](crate::types::SalesforceSourceProperties).
83 pub fn builder() -> crate::types::builders::SalesforceSourcePropertiesBuilder {
84 crate::types::builders::SalesforceSourcePropertiesBuilder::default()
85 }
86}
87
88/// A builder for [`SalesforceSourceProperties`](crate::types::SalesforceSourceProperties).
89#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
90#[non_exhaustive]
91pub struct SalesforceSourcePropertiesBuilder {
92 pub(crate) object: ::std::option::Option<::std::string::String>,
93 pub(crate) enable_dynamic_field_update: ::std::option::Option<bool>,
94 pub(crate) include_deleted_records: ::std::option::Option<bool>,
95 pub(crate) data_transfer_api: ::std::option::Option<crate::types::SalesforceDataTransferApi>,
96}
97impl SalesforceSourcePropertiesBuilder {
98 /// <p>The object specified in the Salesforce flow source.</p>
99 /// This field is required.
100 pub fn object(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.object = ::std::option::Option::Some(input.into());
102 self
103 }
104 /// <p>The object specified in the Salesforce flow source.</p>
105 pub fn set_object(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.object = input;
107 self
108 }
109 /// <p>The object specified in the Salesforce flow source.</p>
110 pub fn get_object(&self) -> &::std::option::Option<::std::string::String> {
111 &self.object
112 }
113 /// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
114 pub fn enable_dynamic_field_update(mut self, input: bool) -> Self {
115 self.enable_dynamic_field_update = ::std::option::Option::Some(input);
116 self
117 }
118 /// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
119 pub fn set_enable_dynamic_field_update(mut self, input: ::std::option::Option<bool>) -> Self {
120 self.enable_dynamic_field_update = input;
121 self
122 }
123 /// <p>The flag that enables dynamic fetching of new (recently added) fields in the Salesforce objects while running a flow.</p>
124 pub fn get_enable_dynamic_field_update(&self) -> &::std::option::Option<bool> {
125 &self.enable_dynamic_field_update
126 }
127 /// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
128 pub fn include_deleted_records(mut self, input: bool) -> Self {
129 self.include_deleted_records = ::std::option::Option::Some(input);
130 self
131 }
132 /// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
133 pub fn set_include_deleted_records(mut self, input: ::std::option::Option<bool>) -> Self {
134 self.include_deleted_records = input;
135 self
136 }
137 /// <p>Indicates whether Amazon AppFlow includes deleted files in the flow run.</p>
138 pub fn get_include_deleted_records(&self) -> &::std::option::Option<bool> {
139 &self.include_deleted_records
140 }
141 /// <p>Specifies which Salesforce API is used by Amazon AppFlow when your flow transfers data from Salesforce.</p>
142 /// <dl>
143 /// <dt>
144 /// AUTOMATIC
145 /// </dt>
146 /// <dd>
147 /// <p>The default. Amazon AppFlow selects which API to use based on the number of records that your flow transfers from Salesforce. If your flow transfers fewer than 1,000,000 records, Amazon AppFlow uses Salesforce REST API. If your flow transfers 1,000,000 records or more, Amazon AppFlow uses Salesforce Bulk API 2.0.</p>
148 /// <p>Each of these Salesforce APIs structures data differently. If Amazon AppFlow selects the API automatically, be aware that, for recurring flows, the data output might vary from one flow run to the next. For example, if a flow runs daily, it might use REST API on one day to transfer 900,000 records, and it might use Bulk API 2.0 on the next day to transfer 1,100,000 records. For each of these flow runs, the respective Salesforce API formats the data differently. Some of the differences include how dates are formatted and null values are represented. Also, Bulk API 2.0 doesn't transfer Salesforce compound fields.</p>
149 /// <p>By choosing this option, you optimize flow performance for both small and large data transfers, but the tradeoff is inconsistent formatting in the output.</p>
150 /// </dd>
151 /// <dt>
152 /// BULKV2
153 /// </dt>
154 /// <dd>
155 /// <p>Amazon AppFlow uses only Salesforce Bulk API 2.0. This API runs asynchronous data transfers, and it's optimal for large sets of data. By choosing this option, you ensure that your flow writes consistent output, but you optimize performance only for large data transfers.</p>
156 /// <p>Note that Bulk API 2.0 does not transfer Salesforce compound fields.</p>
157 /// </dd>
158 /// <dt>
159 /// REST_SYNC
160 /// </dt>
161 /// <dd>
162 /// <p>Amazon AppFlow uses only Salesforce REST API. By choosing this option, you ensure that your flow writes consistent output, but you decrease performance for large data transfers that are better suited for Bulk API 2.0. In some cases, if your flow attempts to transfer a vary large set of data, it might fail wituh a timed out error.</p>
163 /// </dd>
164 /// </dl>
165 pub fn data_transfer_api(mut self, input: crate::types::SalesforceDataTransferApi) -> Self {
166 self.data_transfer_api = ::std::option::Option::Some(input);
167 self
168 }
169 /// <p>Specifies which Salesforce API is used by Amazon AppFlow when your flow transfers data from Salesforce.</p>
170 /// <dl>
171 /// <dt>
172 /// AUTOMATIC
173 /// </dt>
174 /// <dd>
175 /// <p>The default. Amazon AppFlow selects which API to use based on the number of records that your flow transfers from Salesforce. If your flow transfers fewer than 1,000,000 records, Amazon AppFlow uses Salesforce REST API. If your flow transfers 1,000,000 records or more, Amazon AppFlow uses Salesforce Bulk API 2.0.</p>
176 /// <p>Each of these Salesforce APIs structures data differently. If Amazon AppFlow selects the API automatically, be aware that, for recurring flows, the data output might vary from one flow run to the next. For example, if a flow runs daily, it might use REST API on one day to transfer 900,000 records, and it might use Bulk API 2.0 on the next day to transfer 1,100,000 records. For each of these flow runs, the respective Salesforce API formats the data differently. Some of the differences include how dates are formatted and null values are represented. Also, Bulk API 2.0 doesn't transfer Salesforce compound fields.</p>
177 /// <p>By choosing this option, you optimize flow performance for both small and large data transfers, but the tradeoff is inconsistent formatting in the output.</p>
178 /// </dd>
179 /// <dt>
180 /// BULKV2
181 /// </dt>
182 /// <dd>
183 /// <p>Amazon AppFlow uses only Salesforce Bulk API 2.0. This API runs asynchronous data transfers, and it's optimal for large sets of data. By choosing this option, you ensure that your flow writes consistent output, but you optimize performance only for large data transfers.</p>
184 /// <p>Note that Bulk API 2.0 does not transfer Salesforce compound fields.</p>
185 /// </dd>
186 /// <dt>
187 /// REST_SYNC
188 /// </dt>
189 /// <dd>
190 /// <p>Amazon AppFlow uses only Salesforce REST API. By choosing this option, you ensure that your flow writes consistent output, but you decrease performance for large data transfers that are better suited for Bulk API 2.0. In some cases, if your flow attempts to transfer a vary large set of data, it might fail wituh a timed out error.</p>
191 /// </dd>
192 /// </dl>
193 pub fn set_data_transfer_api(mut self, input: ::std::option::Option<crate::types::SalesforceDataTransferApi>) -> Self {
194 self.data_transfer_api = input;
195 self
196 }
197 /// <p>Specifies which Salesforce API is used by Amazon AppFlow when your flow transfers data from Salesforce.</p>
198 /// <dl>
199 /// <dt>
200 /// AUTOMATIC
201 /// </dt>
202 /// <dd>
203 /// <p>The default. Amazon AppFlow selects which API to use based on the number of records that your flow transfers from Salesforce. If your flow transfers fewer than 1,000,000 records, Amazon AppFlow uses Salesforce REST API. If your flow transfers 1,000,000 records or more, Amazon AppFlow uses Salesforce Bulk API 2.0.</p>
204 /// <p>Each of these Salesforce APIs structures data differently. If Amazon AppFlow selects the API automatically, be aware that, for recurring flows, the data output might vary from one flow run to the next. For example, if a flow runs daily, it might use REST API on one day to transfer 900,000 records, and it might use Bulk API 2.0 on the next day to transfer 1,100,000 records. For each of these flow runs, the respective Salesforce API formats the data differently. Some of the differences include how dates are formatted and null values are represented. Also, Bulk API 2.0 doesn't transfer Salesforce compound fields.</p>
205 /// <p>By choosing this option, you optimize flow performance for both small and large data transfers, but the tradeoff is inconsistent formatting in the output.</p>
206 /// </dd>
207 /// <dt>
208 /// BULKV2
209 /// </dt>
210 /// <dd>
211 /// <p>Amazon AppFlow uses only Salesforce Bulk API 2.0. This API runs asynchronous data transfers, and it's optimal for large sets of data. By choosing this option, you ensure that your flow writes consistent output, but you optimize performance only for large data transfers.</p>
212 /// <p>Note that Bulk API 2.0 does not transfer Salesforce compound fields.</p>
213 /// </dd>
214 /// <dt>
215 /// REST_SYNC
216 /// </dt>
217 /// <dd>
218 /// <p>Amazon AppFlow uses only Salesforce REST API. By choosing this option, you ensure that your flow writes consistent output, but you decrease performance for large data transfers that are better suited for Bulk API 2.0. In some cases, if your flow attempts to transfer a vary large set of data, it might fail wituh a timed out error.</p>
219 /// </dd>
220 /// </dl>
221 pub fn get_data_transfer_api(&self) -> &::std::option::Option<crate::types::SalesforceDataTransferApi> {
222 &self.data_transfer_api
223 }
224 /// Consumes the builder and constructs a [`SalesforceSourceProperties`](crate::types::SalesforceSourceProperties).
225 /// This method will fail if any of the following fields are not set:
226 /// - [`object`](crate::types::builders::SalesforceSourcePropertiesBuilder::object)
227 pub fn build(self) -> ::std::result::Result<crate::types::SalesforceSourceProperties, ::aws_smithy_types::error::operation::BuildError> {
228 ::std::result::Result::Ok(crate::types::SalesforceSourceProperties {
229 object: self.object.ok_or_else(|| {
230 ::aws_smithy_types::error::operation::BuildError::missing_field(
231 "object",
232 "object was not specified but it is required when building SalesforceSourceProperties",
233 )
234 })?,
235 enable_dynamic_field_update: self.enable_dynamic_field_update.unwrap_or_default(),
236 include_deleted_records: self.include_deleted_records.unwrap_or_default(),
237 data_transfer_api: self.data_transfer_api,
238 })
239 }
240}