Struct aws_sdk_s3::output::get_object_torrent_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for GetObjectTorrentOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn body(self, input: ByteStream) -> Self
pub fn body(self, input: ByteStream) -> Self
A Bencoded dictionary as defined by the BitTorrent specification
sourcepub fn set_body(self, input: Option<ByteStream>) -> Self
pub fn set_body(self, input: Option<ByteStream>) -> Self
A Bencoded dictionary as defined by the BitTorrent specification
Examples found in repository?
src/operation_deser.rs (lines 2152-2156)
2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163
pub fn parse_get_object_torrent(
op_response: &mut aws_smithy_http::operation::Response,
) -> std::result::Result<crate::output::GetObjectTorrentOutput, crate::error::GetObjectTorrentError>
{
#[allow(unused_variables)]
let (response, properties) = op_response.parts_mut();
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_torrent_output::Builder::default();
let _ = response;
output = output.set_body(Some(
crate::http_serde::deser_payload_get_object_torrent_get_object_torrent_output_body(
response.body_mut(),
)?,
));
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_torrent_get_object_torrent_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectTorrentError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output.build()
})
}
sourcepub fn request_charged(self, input: RequestCharged) -> Self
pub fn request_charged(self, input: RequestCharged) -> Self
If present, indicates that the requester was successfully charged for the request.
sourcepub fn set_request_charged(self, input: Option<RequestCharged>) -> Self
pub fn set_request_charged(self, input: Option<RequestCharged>) -> Self
If present, indicates that the requester was successfully charged for the request.
Examples found in repository?
src/operation_deser.rs (lines 2157-2160)
2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163
pub fn parse_get_object_torrent(
op_response: &mut aws_smithy_http::operation::Response,
) -> std::result::Result<crate::output::GetObjectTorrentOutput, crate::error::GetObjectTorrentError>
{
#[allow(unused_variables)]
let (response, properties) = op_response.parts_mut();
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_torrent_output::Builder::default();
let _ = response;
output = output.set_body(Some(
crate::http_serde::deser_payload_get_object_torrent_get_object_torrent_output_body(
response.body_mut(),
)?,
));
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_torrent_get_object_torrent_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectTorrentError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output.build()
})
}
sourcepub fn build(self) -> GetObjectTorrentOutput
pub fn build(self) -> GetObjectTorrentOutput
Consumes the builder and constructs a GetObjectTorrentOutput
.
Examples found in repository?
src/operation_deser.rs (line 2161)
2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163
pub fn parse_get_object_torrent(
op_response: &mut aws_smithy_http::operation::Response,
) -> std::result::Result<crate::output::GetObjectTorrentOutput, crate::error::GetObjectTorrentError>
{
#[allow(unused_variables)]
let (response, properties) = op_response.parts_mut();
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_torrent_output::Builder::default();
let _ = response;
output = output.set_body(Some(
crate::http_serde::deser_payload_get_object_torrent_get_object_torrent_output_body(
response.body_mut(),
)?,
));
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_torrent_get_object_torrent_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectTorrentError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output.build()
})
}