Skip to main content

aws_sdk_ec2/types/
_athena_integration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes integration options for Amazon Athena.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AthenaIntegration {
7    /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
8    pub integration_result_s3_destination_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The schedule for adding new partitions to the table.</p>
10    pub partition_load_frequency: ::std::option::Option<crate::types::PartitionLoadFrequency>,
11    /// <p>The start date for the partition.</p>
12    pub partition_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
13    /// <p>The end date for the partition.</p>
14    pub partition_end_date: ::std::option::Option<::aws_smithy_types::DateTime>,
15}
16impl AthenaIntegration {
17    /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
18    pub fn integration_result_s3_destination_arn(&self) -> ::std::option::Option<&str> {
19        self.integration_result_s3_destination_arn.as_deref()
20    }
21    /// <p>The schedule for adding new partitions to the table.</p>
22    pub fn partition_load_frequency(&self) -> ::std::option::Option<&crate::types::PartitionLoadFrequency> {
23        self.partition_load_frequency.as_ref()
24    }
25    /// <p>The start date for the partition.</p>
26    pub fn partition_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
27        self.partition_start_date.as_ref()
28    }
29    /// <p>The end date for the partition.</p>
30    pub fn partition_end_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.partition_end_date.as_ref()
32    }
33}
34impl AthenaIntegration {
35    /// Creates a new builder-style object to manufacture [`AthenaIntegration`](crate::types::AthenaIntegration).
36    pub fn builder() -> crate::types::builders::AthenaIntegrationBuilder {
37        crate::types::builders::AthenaIntegrationBuilder::default()
38    }
39}
40
41/// A builder for [`AthenaIntegration`](crate::types::AthenaIntegration).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct AthenaIntegrationBuilder {
45    pub(crate) integration_result_s3_destination_arn: ::std::option::Option<::std::string::String>,
46    pub(crate) partition_load_frequency: ::std::option::Option<crate::types::PartitionLoadFrequency>,
47    pub(crate) partition_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
48    pub(crate) partition_end_date: ::std::option::Option<::aws_smithy_types::DateTime>,
49}
50impl AthenaIntegrationBuilder {
51    /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
52    /// This field is required.
53    pub fn integration_result_s3_destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.integration_result_s3_destination_arn = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
58    pub fn set_integration_result_s3_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.integration_result_s3_destination_arn = input;
60        self
61    }
62    /// <p>The location in Amazon S3 to store the generated CloudFormation template.</p>
63    pub fn get_integration_result_s3_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.integration_result_s3_destination_arn
65    }
66    /// <p>The schedule for adding new partitions to the table.</p>
67    /// This field is required.
68    pub fn partition_load_frequency(mut self, input: crate::types::PartitionLoadFrequency) -> Self {
69        self.partition_load_frequency = ::std::option::Option::Some(input);
70        self
71    }
72    /// <p>The schedule for adding new partitions to the table.</p>
73    pub fn set_partition_load_frequency(mut self, input: ::std::option::Option<crate::types::PartitionLoadFrequency>) -> Self {
74        self.partition_load_frequency = input;
75        self
76    }
77    /// <p>The schedule for adding new partitions to the table.</p>
78    pub fn get_partition_load_frequency(&self) -> &::std::option::Option<crate::types::PartitionLoadFrequency> {
79        &self.partition_load_frequency
80    }
81    /// <p>The start date for the partition.</p>
82    pub fn partition_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
83        self.partition_start_date = ::std::option::Option::Some(input);
84        self
85    }
86    /// <p>The start date for the partition.</p>
87    pub fn set_partition_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
88        self.partition_start_date = input;
89        self
90    }
91    /// <p>The start date for the partition.</p>
92    pub fn get_partition_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
93        &self.partition_start_date
94    }
95    /// <p>The end date for the partition.</p>
96    pub fn partition_end_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
97        self.partition_end_date = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>The end date for the partition.</p>
101    pub fn set_partition_end_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
102        self.partition_end_date = input;
103        self
104    }
105    /// <p>The end date for the partition.</p>
106    pub fn get_partition_end_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
107        &self.partition_end_date
108    }
109    /// Consumes the builder and constructs a [`AthenaIntegration`](crate::types::AthenaIntegration).
110    pub fn build(self) -> crate::types::AthenaIntegration {
111        crate::types::AthenaIntegration {
112            integration_result_s3_destination_arn: self.integration_result_s3_destination_arn,
113            partition_load_frequency: self.partition_load_frequency,
114            partition_start_date: self.partition_start_date,
115            partition_end_date: self.partition_end_date,
116        }
117    }
118}