aws-sdk-ec2 1.221.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 GetConsoleScreenshotOutput {
    /// <p>The data that comprises the image.</p>
    pub image_data: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetConsoleScreenshotOutput {
    /// <p>The data that comprises the image.</p>
    pub fn image_data(&self) -> ::std::option::Option<&str> {
        self.image_data.as_deref()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetConsoleScreenshotOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetConsoleScreenshotOutput {
    /// Creates a new builder-style object to manufacture [`GetConsoleScreenshotOutput`](crate::operation::get_console_screenshot::GetConsoleScreenshotOutput).
    pub fn builder() -> crate::operation::get_console_screenshot::builders::GetConsoleScreenshotOutputBuilder {
        crate::operation::get_console_screenshot::builders::GetConsoleScreenshotOutputBuilder::default()
    }
}

/// A builder for [`GetConsoleScreenshotOutput`](crate::operation::get_console_screenshot::GetConsoleScreenshotOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetConsoleScreenshotOutputBuilder {
    pub(crate) image_data: ::std::option::Option<::std::string::String>,
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetConsoleScreenshotOutputBuilder {
    /// <p>The data that comprises the image.</p>
    pub fn image_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.image_data = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data that comprises the image.</p>
    pub fn set_image_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.image_data = input;
        self
    }
    /// <p>The data that comprises the image.</p>
    pub fn get_image_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.image_data
    }
    /// <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
    }
    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 [`GetConsoleScreenshotOutput`](crate::operation::get_console_screenshot::GetConsoleScreenshotOutput).
    pub fn build(self) -> crate::operation::get_console_screenshot::GetConsoleScreenshotOutput {
        crate::operation::get_console_screenshot::GetConsoleScreenshotOutput {
            image_data: self.image_data,
            instance_id: self.instance_id,
            _request_id: self._request_id,
        }
    }
}