aws_sdk_medialive/types/_hls_basic_put_settings.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Hls Basic Put Settings
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct HlsBasicPutSettings {
7 /// Number of seconds to wait before retrying connection to the CDN if the connection is lost.
8 pub connection_retry_interval: ::std::option::Option<i32>,
9 /// Size in seconds of file cache for streaming outputs.
10 pub filecache_duration: ::std::option::Option<i32>,
11 /// Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
12 pub num_retries: ::std::option::Option<i32>,
13 /// If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never restart.
14 pub restart_delay: ::std::option::Option<i32>,
15}
16impl HlsBasicPutSettings {
17 /// Number of seconds to wait before retrying connection to the CDN if the connection is lost.
18 pub fn connection_retry_interval(&self) -> ::std::option::Option<i32> {
19 self.connection_retry_interval
20 }
21 /// Size in seconds of file cache for streaming outputs.
22 pub fn filecache_duration(&self) -> ::std::option::Option<i32> {
23 self.filecache_duration
24 }
25 /// Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
26 pub fn num_retries(&self) -> ::std::option::Option<i32> {
27 self.num_retries
28 }
29 /// If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never restart.
30 pub fn restart_delay(&self) -> ::std::option::Option<i32> {
31 self.restart_delay
32 }
33}
34impl HlsBasicPutSettings {
35 /// Creates a new builder-style object to manufacture [`HlsBasicPutSettings`](crate::types::HlsBasicPutSettings).
36 pub fn builder() -> crate::types::builders::HlsBasicPutSettingsBuilder {
37 crate::types::builders::HlsBasicPutSettingsBuilder::default()
38 }
39}
40
41/// A builder for [`HlsBasicPutSettings`](crate::types::HlsBasicPutSettings).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct HlsBasicPutSettingsBuilder {
45 pub(crate) connection_retry_interval: ::std::option::Option<i32>,
46 pub(crate) filecache_duration: ::std::option::Option<i32>,
47 pub(crate) num_retries: ::std::option::Option<i32>,
48 pub(crate) restart_delay: ::std::option::Option<i32>,
49}
50impl HlsBasicPutSettingsBuilder {
51 /// Number of seconds to wait before retrying connection to the CDN if the connection is lost.
52 pub fn connection_retry_interval(mut self, input: i32) -> Self {
53 self.connection_retry_interval = ::std::option::Option::Some(input);
54 self
55 }
56 /// Number of seconds to wait before retrying connection to the CDN if the connection is lost.
57 pub fn set_connection_retry_interval(mut self, input: ::std::option::Option<i32>) -> Self {
58 self.connection_retry_interval = input;
59 self
60 }
61 /// Number of seconds to wait before retrying connection to the CDN if the connection is lost.
62 pub fn get_connection_retry_interval(&self) -> &::std::option::Option<i32> {
63 &self.connection_retry_interval
64 }
65 /// Size in seconds of file cache for streaming outputs.
66 pub fn filecache_duration(mut self, input: i32) -> Self {
67 self.filecache_duration = ::std::option::Option::Some(input);
68 self
69 }
70 /// Size in seconds of file cache for streaming outputs.
71 pub fn set_filecache_duration(mut self, input: ::std::option::Option<i32>) -> Self {
72 self.filecache_duration = input;
73 self
74 }
75 /// Size in seconds of file cache for streaming outputs.
76 pub fn get_filecache_duration(&self) -> &::std::option::Option<i32> {
77 &self.filecache_duration
78 }
79 /// Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
80 pub fn num_retries(mut self, input: i32) -> Self {
81 self.num_retries = ::std::option::Option::Some(input);
82 self
83 }
84 /// Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
85 pub fn set_num_retries(mut self, input: ::std::option::Option<i32>) -> Self {
86 self.num_retries = input;
87 self
88 }
89 /// Number of retry attempts that will be made before the Live Event is put into an error state. Applies only if the CDN destination URI begins with "s3" or "mediastore". For other URIs, the value is always 3.
90 pub fn get_num_retries(&self) -> &::std::option::Option<i32> {
91 &self.num_retries
92 }
93 /// If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never restart.
94 pub fn restart_delay(mut self, input: i32) -> Self {
95 self.restart_delay = ::std::option::Option::Some(input);
96 self
97 }
98 /// If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never restart.
99 pub fn set_restart_delay(mut self, input: ::std::option::Option<i32>) -> Self {
100 self.restart_delay = input;
101 self
102 }
103 /// If a streaming output fails, number of seconds to wait until a restart is initiated. A value of 0 means never restart.
104 pub fn get_restart_delay(&self) -> &::std::option::Option<i32> {
105 &self.restart_delay
106 }
107 /// Consumes the builder and constructs a [`HlsBasicPutSettings`](crate::types::HlsBasicPutSettings).
108 pub fn build(self) -> crate::types::HlsBasicPutSettings {
109 crate::types::HlsBasicPutSettings {
110 connection_retry_interval: self.connection_retry_interval,
111 filecache_duration: self.filecache_duration,
112 num_retries: self.num_retries,
113 restart_delay: self.restart_delay,
114 }
115 }
116}