aws_sdk_ivsrealtime/operation/get_participant/
_get_participant_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetParticipantInput {
6    /// <p>Stage ARN.</p>
7    pub stage_arn: ::std::option::Option<::std::string::String>,
8    /// <p>ID of a session within the stage.</p>
9    pub session_id: ::std::option::Option<::std::string::String>,
10    /// <p>Unique identifier for the participant. This is assigned by IVS and returned by <code>CreateParticipantToken</code>.</p>
11    pub participant_id: ::std::option::Option<::std::string::String>,
12}
13impl GetParticipantInput {
14    /// <p>Stage ARN.</p>
15    pub fn stage_arn(&self) -> ::std::option::Option<&str> {
16        self.stage_arn.as_deref()
17    }
18    /// <p>ID of a session within the stage.</p>
19    pub fn session_id(&self) -> ::std::option::Option<&str> {
20        self.session_id.as_deref()
21    }
22    /// <p>Unique identifier for the participant. This is assigned by IVS and returned by <code>CreateParticipantToken</code>.</p>
23    pub fn participant_id(&self) -> ::std::option::Option<&str> {
24        self.participant_id.as_deref()
25    }
26}
27impl GetParticipantInput {
28    /// Creates a new builder-style object to manufacture [`GetParticipantInput`](crate::operation::get_participant::GetParticipantInput).
29    pub fn builder() -> crate::operation::get_participant::builders::GetParticipantInputBuilder {
30        crate::operation::get_participant::builders::GetParticipantInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetParticipantInput`](crate::operation::get_participant::GetParticipantInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetParticipantInputBuilder {
38    pub(crate) stage_arn: ::std::option::Option<::std::string::String>,
39    pub(crate) session_id: ::std::option::Option<::std::string::String>,
40    pub(crate) participant_id: ::std::option::Option<::std::string::String>,
41}
42impl GetParticipantInputBuilder {
43    /// <p>Stage ARN.</p>
44    /// This field is required.
45    pub fn stage_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.stage_arn = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>Stage ARN.</p>
50    pub fn set_stage_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.stage_arn = input;
52        self
53    }
54    /// <p>Stage ARN.</p>
55    pub fn get_stage_arn(&self) -> &::std::option::Option<::std::string::String> {
56        &self.stage_arn
57    }
58    /// <p>ID of a session within the stage.</p>
59    /// This field is required.
60    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.session_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>ID of a session within the stage.</p>
65    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.session_id = input;
67        self
68    }
69    /// <p>ID of a session within the stage.</p>
70    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.session_id
72    }
73    /// <p>Unique identifier for the participant. This is assigned by IVS and returned by <code>CreateParticipantToken</code>.</p>
74    /// This field is required.
75    pub fn participant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.participant_id = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>Unique identifier for the participant. This is assigned by IVS and returned by <code>CreateParticipantToken</code>.</p>
80    pub fn set_participant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.participant_id = input;
82        self
83    }
84    /// <p>Unique identifier for the participant. This is assigned by IVS and returned by <code>CreateParticipantToken</code>.</p>
85    pub fn get_participant_id(&self) -> &::std::option::Option<::std::string::String> {
86        &self.participant_id
87    }
88    /// Consumes the builder and constructs a [`GetParticipantInput`](crate::operation::get_participant::GetParticipantInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::get_participant::GetParticipantInput, ::aws_smithy_types::error::operation::BuildError> {
92        ::std::result::Result::Ok(crate::operation::get_participant::GetParticipantInput {
93            stage_arn: self.stage_arn,
94            session_id: self.session_id,
95            participant_id: self.participant_id,
96        })
97    }
98}