aws_sdk_codecommit/operation/get_blob/
_get_blob_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetBlobInput {
7 pub repository_name: ::std::option::Option<::std::string::String>,
9 pub blob_id: ::std::option::Option<::std::string::String>,
11}
12impl GetBlobInput {
13 pub fn repository_name(&self) -> ::std::option::Option<&str> {
15 self.repository_name.as_deref()
16 }
17 pub fn blob_id(&self) -> ::std::option::Option<&str> {
19 self.blob_id.as_deref()
20 }
21}
22impl GetBlobInput {
23 pub fn builder() -> crate::operation::get_blob::builders::GetBlobInputBuilder {
25 crate::operation::get_blob::builders::GetBlobInputBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GetBlobInputBuilder {
33 pub(crate) repository_name: ::std::option::Option<::std::string::String>,
34 pub(crate) blob_id: ::std::option::Option<::std::string::String>,
35}
36impl GetBlobInputBuilder {
37 pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40 self.repository_name = ::std::option::Option::Some(input.into());
41 self
42 }
43 pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45 self.repository_name = input;
46 self
47 }
48 pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
50 &self.repository_name
51 }
52 pub fn blob_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.blob_id = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_blob_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.blob_id = input;
61 self
62 }
63 pub fn get_blob_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.blob_id
66 }
67 pub fn build(self) -> ::std::result::Result<crate::operation::get_blob::GetBlobInput, ::aws_smithy_types::error::operation::BuildError> {
69 ::std::result::Result::Ok(crate::operation::get_blob::GetBlobInput {
70 repository_name: self.repository_name,
71 blob_id: self.blob_id,
72 })
73 }
74}