Skip to main content

aws_sdk_appflow/types/
_aggregation_config.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The aggregation settings that you can use to customize the output format of your flow data.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AggregationConfig {
7    /// <p>Specifies whether Amazon AppFlow aggregates the flow records into a single file, or leave them unaggregated.</p>
8    pub aggregation_type: ::std::option::Option<crate::types::AggregationType>,
9    /// <p>The desired file size, in MB, for each output file that Amazon AppFlow writes to the flow destination. For each file, Amazon AppFlow attempts to achieve the size that you specify. The actual file sizes might differ from this target based on the number and size of the records that each file contains.</p>
10    pub target_file_size: ::std::option::Option<i64>,
11}
12impl AggregationConfig {
13    /// <p>Specifies whether Amazon AppFlow aggregates the flow records into a single file, or leave them unaggregated.</p>
14    pub fn aggregation_type(&self) -> ::std::option::Option<&crate::types::AggregationType> {
15        self.aggregation_type.as_ref()
16    }
17    /// <p>The desired file size, in MB, for each output file that Amazon AppFlow writes to the flow destination. For each file, Amazon AppFlow attempts to achieve the size that you specify. The actual file sizes might differ from this target based on the number and size of the records that each file contains.</p>
18    pub fn target_file_size(&self) -> ::std::option::Option<i64> {
19        self.target_file_size
20    }
21}
22impl AggregationConfig {
23    /// Creates a new builder-style object to manufacture [`AggregationConfig`](crate::types::AggregationConfig).
24    pub fn builder() -> crate::types::builders::AggregationConfigBuilder {
25        crate::types::builders::AggregationConfigBuilder::default()
26    }
27}
28
29/// A builder for [`AggregationConfig`](crate::types::AggregationConfig).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct AggregationConfigBuilder {
33    pub(crate) aggregation_type: ::std::option::Option<crate::types::AggregationType>,
34    pub(crate) target_file_size: ::std::option::Option<i64>,
35}
36impl AggregationConfigBuilder {
37    /// <p>Specifies whether Amazon AppFlow aggregates the flow records into a single file, or leave them unaggregated.</p>
38    pub fn aggregation_type(mut self, input: crate::types::AggregationType) -> Self {
39        self.aggregation_type = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>Specifies whether Amazon AppFlow aggregates the flow records into a single file, or leave them unaggregated.</p>
43    pub fn set_aggregation_type(mut self, input: ::std::option::Option<crate::types::AggregationType>) -> Self {
44        self.aggregation_type = input;
45        self
46    }
47    /// <p>Specifies whether Amazon AppFlow aggregates the flow records into a single file, or leave them unaggregated.</p>
48    pub fn get_aggregation_type(&self) -> &::std::option::Option<crate::types::AggregationType> {
49        &self.aggregation_type
50    }
51    /// <p>The desired file size, in MB, for each output file that Amazon AppFlow writes to the flow destination. For each file, Amazon AppFlow attempts to achieve the size that you specify. The actual file sizes might differ from this target based on the number and size of the records that each file contains.</p>
52    pub fn target_file_size(mut self, input: i64) -> Self {
53        self.target_file_size = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>The desired file size, in MB, for each output file that Amazon AppFlow writes to the flow destination. For each file, Amazon AppFlow attempts to achieve the size that you specify. The actual file sizes might differ from this target based on the number and size of the records that each file contains.</p>
57    pub fn set_target_file_size(mut self, input: ::std::option::Option<i64>) -> Self {
58        self.target_file_size = input;
59        self
60    }
61    /// <p>The desired file size, in MB, for each output file that Amazon AppFlow writes to the flow destination. For each file, Amazon AppFlow attempts to achieve the size that you specify. The actual file sizes might differ from this target based on the number and size of the records that each file contains.</p>
62    pub fn get_target_file_size(&self) -> &::std::option::Option<i64> {
63        &self.target_file_size
64    }
65    /// Consumes the builder and constructs a [`AggregationConfig`](crate::types::AggregationConfig).
66    pub fn build(self) -> crate::types::AggregationConfig {
67        crate::types::AggregationConfig {
68            aggregation_type: self.aggregation_type,
69            target_file_size: self.target_file_size,
70        }
71    }
72}