aws-sdk-apptest 1.57.0

AWS SDK for AWS Mainframe Modernization Application Testing
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Specifies the TN3270 protocol.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Tn3270 {
    /// <p>The script of the TN3270 protocol.</p>
    pub script: ::std::option::Option<crate::types::Script>,
    /// <p>The data set names of the TN3270 protocol.</p>
    pub export_data_set_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Tn3270 {
    /// <p>The script of the TN3270 protocol.</p>
    pub fn script(&self) -> ::std::option::Option<&crate::types::Script> {
        self.script.as_ref()
    }
    /// <p>The data set names of the TN3270 protocol.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.export_data_set_names.is_none()`.
    pub fn export_data_set_names(&self) -> &[::std::string::String] {
        self.export_data_set_names.as_deref().unwrap_or_default()
    }
}
impl Tn3270 {
    /// Creates a new builder-style object to manufacture [`Tn3270`](crate::types::Tn3270).
    pub fn builder() -> crate::types::builders::Tn3270Builder {
        crate::types::builders::Tn3270Builder::default()
    }
}

/// A builder for [`Tn3270`](crate::types::Tn3270).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct Tn3270Builder {
    pub(crate) script: ::std::option::Option<crate::types::Script>,
    pub(crate) export_data_set_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Tn3270Builder {
    /// <p>The script of the TN3270 protocol.</p>
    /// This field is required.
    pub fn script(mut self, input: crate::types::Script) -> Self {
        self.script = ::std::option::Option::Some(input);
        self
    }
    /// <p>The script of the TN3270 protocol.</p>
    pub fn set_script(mut self, input: ::std::option::Option<crate::types::Script>) -> Self {
        self.script = input;
        self
    }
    /// <p>The script of the TN3270 protocol.</p>
    pub fn get_script(&self) -> &::std::option::Option<crate::types::Script> {
        &self.script
    }
    /// Appends an item to `export_data_set_names`.
    ///
    /// To override the contents of this collection use [`set_export_data_set_names`](Self::set_export_data_set_names).
    ///
    /// <p>The data set names of the TN3270 protocol.</p>
    pub fn export_data_set_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.export_data_set_names.unwrap_or_default();
        v.push(input.into());
        self.export_data_set_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The data set names of the TN3270 protocol.</p>
    pub fn set_export_data_set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.export_data_set_names = input;
        self
    }
    /// <p>The data set names of the TN3270 protocol.</p>
    pub fn get_export_data_set_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.export_data_set_names
    }
    /// Consumes the builder and constructs a [`Tn3270`](crate::types::Tn3270).
    pub fn build(self) -> crate::types::Tn3270 {
        crate::types::Tn3270 {
            script: self.script,
            export_data_set_names: self.export_data_set_names,
        }
    }
}