aws_sdk_codecommit/operation/delete_file/
_delete_file_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteFileOutput {
6 pub commit_id: ::std::string::String,
8 pub blob_id: ::std::string::String,
10 pub tree_id: ::std::string::String,
12 pub file_path: ::std::string::String,
14 _request_id: Option<String>,
15}
16impl DeleteFileOutput {
17 pub fn commit_id(&self) -> &str {
19 use std::ops::Deref;
20 self.commit_id.deref()
21 }
22 pub fn blob_id(&self) -> &str {
24 use std::ops::Deref;
25 self.blob_id.deref()
26 }
27 pub fn tree_id(&self) -> &str {
29 use std::ops::Deref;
30 self.tree_id.deref()
31 }
32 pub fn file_path(&self) -> &str {
34 use std::ops::Deref;
35 self.file_path.deref()
36 }
37}
38impl ::aws_types::request_id::RequestId for DeleteFileOutput {
39 fn request_id(&self) -> Option<&str> {
40 self._request_id.as_deref()
41 }
42}
43impl DeleteFileOutput {
44 pub fn builder() -> crate::operation::delete_file::builders::DeleteFileOutputBuilder {
46 crate::operation::delete_file::builders::DeleteFileOutputBuilder::default()
47 }
48}
49
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct DeleteFileOutputBuilder {
54 pub(crate) commit_id: ::std::option::Option<::std::string::String>,
55 pub(crate) blob_id: ::std::option::Option<::std::string::String>,
56 pub(crate) tree_id: ::std::option::Option<::std::string::String>,
57 pub(crate) file_path: ::std::option::Option<::std::string::String>,
58 _request_id: Option<String>,
59}
60impl DeleteFileOutputBuilder {
61 pub fn commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.commit_id = ::std::option::Option::Some(input.into());
65 self
66 }
67 pub fn set_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.commit_id = input;
70 self
71 }
72 pub fn get_commit_id(&self) -> &::std::option::Option<::std::string::String> {
74 &self.commit_id
75 }
76 pub fn blob_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.blob_id = ::std::option::Option::Some(input.into());
80 self
81 }
82 pub fn set_blob_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.blob_id = input;
85 self
86 }
87 pub fn get_blob_id(&self) -> &::std::option::Option<::std::string::String> {
89 &self.blob_id
90 }
91 pub fn tree_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.tree_id = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_tree_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.tree_id = input;
100 self
101 }
102 pub fn get_tree_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.tree_id
105 }
106 pub fn file_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.file_path = ::std::option::Option::Some(input.into());
110 self
111 }
112 pub fn set_file_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.file_path = input;
115 self
116 }
117 pub fn get_file_path(&self) -> &::std::option::Option<::std::string::String> {
119 &self.file_path
120 }
121 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
122 self._request_id = Some(request_id.into());
123 self
124 }
125
126 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
127 self._request_id = request_id;
128 self
129 }
130 pub fn build(self) -> ::std::result::Result<crate::operation::delete_file::DeleteFileOutput, ::aws_smithy_types::error::operation::BuildError> {
137 ::std::result::Result::Ok(crate::operation::delete_file::DeleteFileOutput {
138 commit_id: self.commit_id.ok_or_else(|| {
139 ::aws_smithy_types::error::operation::BuildError::missing_field(
140 "commit_id",
141 "commit_id was not specified but it is required when building DeleteFileOutput",
142 )
143 })?,
144 blob_id: self.blob_id.ok_or_else(|| {
145 ::aws_smithy_types::error::operation::BuildError::missing_field(
146 "blob_id",
147 "blob_id was not specified but it is required when building DeleteFileOutput",
148 )
149 })?,
150 tree_id: self.tree_id.ok_or_else(|| {
151 ::aws_smithy_types::error::operation::BuildError::missing_field(
152 "tree_id",
153 "tree_id was not specified but it is required when building DeleteFileOutput",
154 )
155 })?,
156 file_path: self.file_path.ok_or_else(|| {
157 ::aws_smithy_types::error::operation::BuildError::missing_field(
158 "file_path",
159 "file_path was not specified but it is required when building DeleteFileOutput",
160 )
161 })?,
162 _request_id: self._request_id,
163 })
164 }
165}