Skip to main content

aws_sdk_sagemaker/types/
_retention_policy.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The retention policy for data stored on an Amazon Elastic File System volume.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RetentionPolicy {
7    /// <p>The default is <code>Retain</code>, which specifies to keep the data stored on the Amazon EFS volume.</p>
8    /// <p>Specify <code>Delete</code> to delete the data stored on the Amazon EFS volume.</p>
9    pub home_efs_file_system: ::std::option::Option<crate::types::RetentionType>,
10}
11impl RetentionPolicy {
12    /// <p>The default is <code>Retain</code>, which specifies to keep the data stored on the Amazon EFS volume.</p>
13    /// <p>Specify <code>Delete</code> to delete the data stored on the Amazon EFS volume.</p>
14    pub fn home_efs_file_system(&self) -> ::std::option::Option<&crate::types::RetentionType> {
15        self.home_efs_file_system.as_ref()
16    }
17}
18impl RetentionPolicy {
19    /// Creates a new builder-style object to manufacture [`RetentionPolicy`](crate::types::RetentionPolicy).
20    pub fn builder() -> crate::types::builders::RetentionPolicyBuilder {
21        crate::types::builders::RetentionPolicyBuilder::default()
22    }
23}
24
25/// A builder for [`RetentionPolicy`](crate::types::RetentionPolicy).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct RetentionPolicyBuilder {
29    pub(crate) home_efs_file_system: ::std::option::Option<crate::types::RetentionType>,
30}
31impl RetentionPolicyBuilder {
32    /// <p>The default is <code>Retain</code>, which specifies to keep the data stored on the Amazon EFS volume.</p>
33    /// <p>Specify <code>Delete</code> to delete the data stored on the Amazon EFS volume.</p>
34    pub fn home_efs_file_system(mut self, input: crate::types::RetentionType) -> Self {
35        self.home_efs_file_system = ::std::option::Option::Some(input);
36        self
37    }
38    /// <p>The default is <code>Retain</code>, which specifies to keep the data stored on the Amazon EFS volume.</p>
39    /// <p>Specify <code>Delete</code> to delete the data stored on the Amazon EFS volume.</p>
40    pub fn set_home_efs_file_system(mut self, input: ::std::option::Option<crate::types::RetentionType>) -> Self {
41        self.home_efs_file_system = input;
42        self
43    }
44    /// <p>The default is <code>Retain</code>, which specifies to keep the data stored on the Amazon EFS volume.</p>
45    /// <p>Specify <code>Delete</code> to delete the data stored on the Amazon EFS volume.</p>
46    pub fn get_home_efs_file_system(&self) -> &::std::option::Option<crate::types::RetentionType> {
47        &self.home_efs_file_system
48    }
49    /// Consumes the builder and constructs a [`RetentionPolicy`](crate::types::RetentionPolicy).
50    pub fn build(self) -> crate::types::RetentionPolicy {
51        crate::types::RetentionPolicy {
52            home_efs_file_system: self.home_efs_file_system,
53        }
54    }
55}