aws_sdk_medialive/types/
_archive_group_settings.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Archive Group Settings
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ArchiveGroupSettings {
7    /// Parameters that control interactions with the CDN.
8    pub archive_cdn_settings: ::std::option::Option<crate::types::ArchiveCdnSettings>,
9    /// A directory and base filename where archive files should be written.
10    pub destination: ::std::option::Option<crate::types::OutputLocationRef>,
11    /// Number of seconds to write to archive file before closing and starting a new one.
12    pub rollover_interval: ::std::option::Option<i32>,
13}
14impl ArchiveGroupSettings {
15    /// Parameters that control interactions with the CDN.
16    pub fn archive_cdn_settings(&self) -> ::std::option::Option<&crate::types::ArchiveCdnSettings> {
17        self.archive_cdn_settings.as_ref()
18    }
19    /// A directory and base filename where archive files should be written.
20    pub fn destination(&self) -> ::std::option::Option<&crate::types::OutputLocationRef> {
21        self.destination.as_ref()
22    }
23    /// Number of seconds to write to archive file before closing and starting a new one.
24    pub fn rollover_interval(&self) -> ::std::option::Option<i32> {
25        self.rollover_interval
26    }
27}
28impl ArchiveGroupSettings {
29    /// Creates a new builder-style object to manufacture [`ArchiveGroupSettings`](crate::types::ArchiveGroupSettings).
30    pub fn builder() -> crate::types::builders::ArchiveGroupSettingsBuilder {
31        crate::types::builders::ArchiveGroupSettingsBuilder::default()
32    }
33}
34
35/// A builder for [`ArchiveGroupSettings`](crate::types::ArchiveGroupSettings).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct ArchiveGroupSettingsBuilder {
39    pub(crate) archive_cdn_settings: ::std::option::Option<crate::types::ArchiveCdnSettings>,
40    pub(crate) destination: ::std::option::Option<crate::types::OutputLocationRef>,
41    pub(crate) rollover_interval: ::std::option::Option<i32>,
42}
43impl ArchiveGroupSettingsBuilder {
44    /// Parameters that control interactions with the CDN.
45    pub fn archive_cdn_settings(mut self, input: crate::types::ArchiveCdnSettings) -> Self {
46        self.archive_cdn_settings = ::std::option::Option::Some(input);
47        self
48    }
49    /// Parameters that control interactions with the CDN.
50    pub fn set_archive_cdn_settings(mut self, input: ::std::option::Option<crate::types::ArchiveCdnSettings>) -> Self {
51        self.archive_cdn_settings = input;
52        self
53    }
54    /// Parameters that control interactions with the CDN.
55    pub fn get_archive_cdn_settings(&self) -> &::std::option::Option<crate::types::ArchiveCdnSettings> {
56        &self.archive_cdn_settings
57    }
58    /// A directory and base filename where archive files should be written.
59    /// This field is required.
60    pub fn destination(mut self, input: crate::types::OutputLocationRef) -> Self {
61        self.destination = ::std::option::Option::Some(input);
62        self
63    }
64    /// A directory and base filename where archive files should be written.
65    pub fn set_destination(mut self, input: ::std::option::Option<crate::types::OutputLocationRef>) -> Self {
66        self.destination = input;
67        self
68    }
69    /// A directory and base filename where archive files should be written.
70    pub fn get_destination(&self) -> &::std::option::Option<crate::types::OutputLocationRef> {
71        &self.destination
72    }
73    /// Number of seconds to write to archive file before closing and starting a new one.
74    pub fn rollover_interval(mut self, input: i32) -> Self {
75        self.rollover_interval = ::std::option::Option::Some(input);
76        self
77    }
78    /// Number of seconds to write to archive file before closing and starting a new one.
79    pub fn set_rollover_interval(mut self, input: ::std::option::Option<i32>) -> Self {
80        self.rollover_interval = input;
81        self
82    }
83    /// Number of seconds to write to archive file before closing and starting a new one.
84    pub fn get_rollover_interval(&self) -> &::std::option::Option<i32> {
85        &self.rollover_interval
86    }
87    /// Consumes the builder and constructs a [`ArchiveGroupSettings`](crate::types::ArchiveGroupSettings).
88    pub fn build(self) -> crate::types::ArchiveGroupSettings {
89        crate::types::ArchiveGroupSettings {
90            archive_cdn_settings: self.archive_cdn_settings,
91            destination: self.destination,
92            rollover_interval: self.rollover_interval,
93        }
94    }
95}