Skip to main content

aws_sdk_ec2/types/
_export_task_s3_location_request.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes the destination for an export image task.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ExportTaskS3LocationRequest {
7    /// <p>The destination Amazon S3 bucket.</p>
8    pub s3_bucket: ::std::option::Option<::std::string::String>,
9    /// <p>The prefix (logical hierarchy) in the bucket.</p>
10    pub s3_prefix: ::std::option::Option<::std::string::String>,
11}
12impl ExportTaskS3LocationRequest {
13    /// <p>The destination Amazon S3 bucket.</p>
14    pub fn s3_bucket(&self) -> ::std::option::Option<&str> {
15        self.s3_bucket.as_deref()
16    }
17    /// <p>The prefix (logical hierarchy) in the bucket.</p>
18    pub fn s3_prefix(&self) -> ::std::option::Option<&str> {
19        self.s3_prefix.as_deref()
20    }
21}
22impl ExportTaskS3LocationRequest {
23    /// Creates a new builder-style object to manufacture [`ExportTaskS3LocationRequest`](crate::types::ExportTaskS3LocationRequest).
24    pub fn builder() -> crate::types::builders::ExportTaskS3LocationRequestBuilder {
25        crate::types::builders::ExportTaskS3LocationRequestBuilder::default()
26    }
27}
28
29/// A builder for [`ExportTaskS3LocationRequest`](crate::types::ExportTaskS3LocationRequest).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct ExportTaskS3LocationRequestBuilder {
33    pub(crate) s3_bucket: ::std::option::Option<::std::string::String>,
34    pub(crate) s3_prefix: ::std::option::Option<::std::string::String>,
35}
36impl ExportTaskS3LocationRequestBuilder {
37    /// <p>The destination Amazon S3 bucket.</p>
38    /// This field is required.
39    pub fn s3_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.s3_bucket = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The destination Amazon S3 bucket.</p>
44    pub fn set_s3_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.s3_bucket = input;
46        self
47    }
48    /// <p>The destination Amazon S3 bucket.</p>
49    pub fn get_s3_bucket(&self) -> &::std::option::Option<::std::string::String> {
50        &self.s3_bucket
51    }
52    /// <p>The prefix (logical hierarchy) in the bucket.</p>
53    pub fn s3_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.s3_prefix = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The prefix (logical hierarchy) in the bucket.</p>
58    pub fn set_s3_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.s3_prefix = input;
60        self
61    }
62    /// <p>The prefix (logical hierarchy) in the bucket.</p>
63    pub fn get_s3_prefix(&self) -> &::std::option::Option<::std::string::String> {
64        &self.s3_prefix
65    }
66    /// Consumes the builder and constructs a [`ExportTaskS3LocationRequest`](crate::types::ExportTaskS3LocationRequest).
67    pub fn build(self) -> crate::types::ExportTaskS3LocationRequest {
68        crate::types::ExportTaskS3LocationRequest {
69            s3_bucket: self.s3_bucket,
70            s3_prefix: self.s3_prefix,
71        }
72    }
73}