Skip to main content

aws_sdk_medialive/types/
_audio_pid_selection.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Audio Pid Selection
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AudioPidSelection {
7    /// Selects a specific PID from within a source.
8    pub pid: ::std::option::Option<i32>,
9}
10impl AudioPidSelection {
11    /// Selects a specific PID from within a source.
12    pub fn pid(&self) -> ::std::option::Option<i32> {
13        self.pid
14    }
15}
16impl AudioPidSelection {
17    /// Creates a new builder-style object to manufacture [`AudioPidSelection`](crate::types::AudioPidSelection).
18    pub fn builder() -> crate::types::builders::AudioPidSelectionBuilder {
19        crate::types::builders::AudioPidSelectionBuilder::default()
20    }
21}
22
23/// A builder for [`AudioPidSelection`](crate::types::AudioPidSelection).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct AudioPidSelectionBuilder {
27    pub(crate) pid: ::std::option::Option<i32>,
28}
29impl AudioPidSelectionBuilder {
30    /// Selects a specific PID from within a source.
31    /// This field is required.
32    pub fn pid(mut self, input: i32) -> Self {
33        self.pid = ::std::option::Option::Some(input);
34        self
35    }
36    /// Selects a specific PID from within a source.
37    pub fn set_pid(mut self, input: ::std::option::Option<i32>) -> Self {
38        self.pid = input;
39        self
40    }
41    /// Selects a specific PID from within a source.
42    pub fn get_pid(&self) -> &::std::option::Option<i32> {
43        &self.pid
44    }
45    /// Consumes the builder and constructs a [`AudioPidSelection`](crate::types::AudioPidSelection).
46    pub fn build(self) -> crate::types::AudioPidSelection {
47        crate::types::AudioPidSelection { pid: self.pid }
48    }
49}