aws-sdk-ec2 1.222.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// 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 GetConsoleOutputOutput {
    /// <p>The ID of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The time at which the output was last updated.</p>
    pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The console output, base64-encoded. If you are using a command line tool, the tool decodes the output for you.</p>
    pub output: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetConsoleOutputOutput {
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The time at which the output was last updated.</p>
    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
    /// <p>The console output, base64-encoded. If you are using a command line tool, the tool decodes the output for you.</p>
    pub fn output(&self) -> ::std::option::Option<&str> {
        self.output.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetConsoleOutputOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetConsoleOutputOutput {
    /// Creates a new builder-style object to manufacture [`GetConsoleOutputOutput`](crate::operation::get_console_output::GetConsoleOutputOutput).
    pub fn builder() -> crate::operation::get_console_output::builders::GetConsoleOutputOutputBuilder {
        crate::operation::get_console_output::builders::GetConsoleOutputOutputBuilder::default()
    }
}

/// A builder for [`GetConsoleOutputOutput`](crate::operation::get_console_output::GetConsoleOutputOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetConsoleOutputOutputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) output: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetConsoleOutputOutputBuilder {
    /// <p>The ID of the instance.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The ID of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The time at which the output was last updated.</p>
    pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the output was last updated.</p>
    pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.timestamp = input;
        self
    }
    /// <p>The time at which the output was last updated.</p>
    pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.timestamp
    }
    /// <p>The console output, base64-encoded. If you are using a command line tool, the tool decodes the output for you.</p>
    pub fn output(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.output = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The console output, base64-encoded. If you are using a command line tool, the tool decodes the output for you.</p>
    pub fn set_output(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.output = input;
        self
    }
    /// <p>The console output, base64-encoded. If you are using a command line tool, the tool decodes the output for you.</p>
    pub fn get_output(&self) -> &::std::option::Option<::std::string::String> {
        &self.output
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetConsoleOutputOutput`](crate::operation::get_console_output::GetConsoleOutputOutput).
    pub fn build(self) -> crate::operation::get_console_output::GetConsoleOutputOutput {
        crate::operation::get_console_output::GetConsoleOutputOutput {
            instance_id: self.instance_id,
            timestamp: self.timestamp,
            output: self.output,
            _request_id: self._request_id,
        }
    }
}