aws-sdk-iot 1.112.0

AWS SDK for AWS IoT
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a group of files that can be streamed.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Stream {
    /// <p>The stream ID.</p>
    pub stream_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of a file associated with a stream.</p>
    pub file_id: ::std::option::Option<i32>,
}
impl Stream {
    /// <p>The stream ID.</p>
    pub fn stream_id(&self) -> ::std::option::Option<&str> {
        self.stream_id.as_deref()
    }
    /// <p>The ID of a file associated with a stream.</p>
    pub fn file_id(&self) -> ::std::option::Option<i32> {
        self.file_id
    }
}
impl Stream {
    /// Creates a new builder-style object to manufacture [`Stream`](crate::types::Stream).
    pub fn builder() -> crate::types::builders::StreamBuilder {
        crate::types::builders::StreamBuilder::default()
    }
}

/// A builder for [`Stream`](crate::types::Stream).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StreamBuilder {
    pub(crate) stream_id: ::std::option::Option<::std::string::String>,
    pub(crate) file_id: ::std::option::Option<i32>,
}
impl StreamBuilder {
    /// <p>The stream ID.</p>
    pub fn stream_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stream_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The stream ID.</p>
    pub fn set_stream_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stream_id = input;
        self
    }
    /// <p>The stream ID.</p>
    pub fn get_stream_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.stream_id
    }
    /// <p>The ID of a file associated with a stream.</p>
    pub fn file_id(mut self, input: i32) -> Self {
        self.file_id = ::std::option::Option::Some(input);
        self
    }
    /// <p>The ID of a file associated with a stream.</p>
    pub fn set_file_id(mut self, input: ::std::option::Option<i32>) -> Self {
        self.file_id = input;
        self
    }
    /// <p>The ID of a file associated with a stream.</p>
    pub fn get_file_id(&self) -> &::std::option::Option<i32> {
        &self.file_id
    }
    /// Consumes the builder and constructs a [`Stream`](crate::types::Stream).
    pub fn build(self) -> crate::types::Stream {
        crate::types::Stream {
            stream_id: self.stream_id,
            file_id: self.file_id,
        }
    }
}