// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Specifies JSON as request's output serialization format.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct JsonOutput {
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
    pub record_delimiter: ::std::option::Option<::std::string::String>,
}
impl JsonOutput {
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
    pub fn record_delimiter(&self) -> ::std::option::Option<&str> {
        self.record_delimiter.as_deref()
    }
}
impl JsonOutput {
    /// Creates a new builder-style object to manufacture [`JsonOutput`](crate::types::JsonOutput).
    pub fn builder() -> crate::types::builders::JsonOutputBuilder {
        crate::types::builders::JsonOutputBuilder::default()
    }
}

/// A builder for [`JsonOutput`](crate::types::JsonOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct JsonOutputBuilder {
    pub(crate) record_delimiter: ::std::option::Option<::std::string::String>,
}
impl JsonOutputBuilder {
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
    pub fn record_delimiter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.record_delimiter = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
    pub fn set_record_delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.record_delimiter = input;
        self
    }
    /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
    pub fn get_record_delimiter(&self) -> &::std::option::Option<::std::string::String> {
        &self.record_delimiter
    }
    /// Consumes the builder and constructs a [`JsonOutput`](crate::types::JsonOutput).
    pub fn build(self) -> crate::types::JsonOutput {
        crate::types::JsonOutput {
            record_delimiter: self.record_delimiter,
        }
    }
}
