aws_sdk_codecommit/operation/get_blob/
_get_blob_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetBlobOutput {
7 pub content: ::aws_smithy_types::Blob,
9 _request_id: Option<String>,
10}
11impl GetBlobOutput {
12 pub fn content(&self) -> &::aws_smithy_types::Blob {
14 &self.content
15 }
16}
17impl ::aws_types::request_id::RequestId for GetBlobOutput {
18 fn request_id(&self) -> Option<&str> {
19 self._request_id.as_deref()
20 }
21}
22impl GetBlobOutput {
23 pub fn builder() -> crate::operation::get_blob::builders::GetBlobOutputBuilder {
25 crate::operation::get_blob::builders::GetBlobOutputBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GetBlobOutputBuilder {
33 pub(crate) content: ::std::option::Option<::aws_smithy_types::Blob>,
34 _request_id: Option<String>,
35}
36impl GetBlobOutputBuilder {
37 pub fn content(mut self, input: ::aws_smithy_types::Blob) -> Self {
40 self.content = ::std::option::Option::Some(input);
41 self
42 }
43 pub fn set_content(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
45 self.content = input;
46 self
47 }
48 pub fn get_content(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
50 &self.content
51 }
52 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
53 self._request_id = Some(request_id.into());
54 self
55 }
56
57 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
58 self._request_id = request_id;
59 self
60 }
61 pub fn build(self) -> ::std::result::Result<crate::operation::get_blob::GetBlobOutput, ::aws_smithy_types::error::operation::BuildError> {
65 ::std::result::Result::Ok(crate::operation::get_blob::GetBlobOutput {
66 content: self.content.ok_or_else(|| {
67 ::aws_smithy_types::error::operation::BuildError::missing_field(
68 "content",
69 "content was not specified but it is required when building GetBlobOutput",
70 )
71 })?,
72 _request_id: self._request_id,
73 })
74 }
75}