// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetIceServerConfigInput {
    /// <p>The ARN of the signaling channel to be used for the peer-to-peer connection between configured peers.</p>
    pub channel_arn: ::std::option::Option<::std::string::String>,
    /// <p>Unique identifier for the viewer. Must be unique within the signaling channel.</p>
    pub client_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid value.</p>
    pub service: ::std::option::Option<crate::types::Service>,
    /// <p>An optional user ID to be associated with the credentials.</p>
    pub username: ::std::option::Option<::std::string::String>,
}
impl GetIceServerConfigInput {
    /// <p>The ARN of the signaling channel to be used for the peer-to-peer connection between configured peers.</p>
    pub fn channel_arn(&self) -> ::std::option::Option<&str> {
        self.channel_arn.as_deref()
    }
    /// <p>Unique identifier for the viewer. Must be unique within the signaling channel.</p>
    pub fn client_id(&self) -> ::std::option::Option<&str> {
        self.client_id.as_deref()
    }
    /// <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid value.</p>
    pub fn service(&self) -> ::std::option::Option<&crate::types::Service> {
        self.service.as_ref()
    }
    /// <p>An optional user ID to be associated with the credentials.</p>
    pub fn username(&self) -> ::std::option::Option<&str> {
        self.username.as_deref()
    }
}
impl GetIceServerConfigInput {
    /// Creates a new builder-style object to manufacture [`GetIceServerConfigInput`](crate::operation::get_ice_server_config::GetIceServerConfigInput).
    pub fn builder() -> crate::operation::get_ice_server_config::builders::GetIceServerConfigInputBuilder {
        crate::operation::get_ice_server_config::builders::GetIceServerConfigInputBuilder::default()
    }
}

/// A builder for [`GetIceServerConfigInput`](crate::operation::get_ice_server_config::GetIceServerConfigInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetIceServerConfigInputBuilder {
    pub(crate) channel_arn: ::std::option::Option<::std::string::String>,
    pub(crate) client_id: ::std::option::Option<::std::string::String>,
    pub(crate) service: ::std::option::Option<crate::types::Service>,
    pub(crate) username: ::std::option::Option<::std::string::String>,
}
impl GetIceServerConfigInputBuilder {
    /// <p>The ARN of the signaling channel to be used for the peer-to-peer connection between configured peers.</p>
    /// This field is required.
    pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.channel_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the signaling channel to be used for the peer-to-peer connection between configured peers.</p>
    pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.channel_arn = input;
        self
    }
    /// <p>The ARN of the signaling channel to be used for the peer-to-peer connection between configured peers.</p>
    pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.channel_arn
    }
    /// <p>Unique identifier for the viewer. Must be unique within the signaling channel.</p>
    pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique identifier for the viewer. Must be unique within the signaling channel.</p>
    pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_id = input;
        self
    }
    /// <p>Unique identifier for the viewer. Must be unique within the signaling channel.</p>
    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_id
    }
    /// <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid value.</p>
    pub fn service(mut self, input: crate::types::Service) -> Self {
        self.service = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid value.</p>
    pub fn set_service(mut self, input: ::std::option::Option<crate::types::Service>) -> Self {
        self.service = input;
        self
    }
    /// <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid value.</p>
    pub fn get_service(&self) -> &::std::option::Option<crate::types::Service> {
        &self.service
    }
    /// <p>An optional user ID to be associated with the credentials.</p>
    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.username = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An optional user ID to be associated with the credentials.</p>
    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.username = input;
        self
    }
    /// <p>An optional user ID to be associated with the credentials.</p>
    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
        &self.username
    }
    /// Consumes the builder and constructs a [`GetIceServerConfigInput`](crate::operation::get_ice_server_config::GetIceServerConfigInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_ice_server_config::GetIceServerConfigInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_ice_server_config::GetIceServerConfigInput {
            channel_arn: self.channel_arn,
            client_id: self.client_id,
            service: self.service,
            username: self.username,
        })
    }
}
