aws_sdk_codecommit/operation/get_differences/_get_differences_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetDifferencesInput {
6 /// <p>The name of the repository where you want to get differences.</p>
7 pub repository_name: ::std::option::Option<::std::string::String>,
8 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, the full commit ID). Optional. If not specified, all changes before the <code>afterCommitSpecifier</code> value are shown. If you do not use <code>beforeCommitSpecifier</code> in your request, consider limiting the results with <code>maxResults</code>.</p>
9 pub before_commit_specifier: ::std::option::Option<::std::string::String>,
10 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit.</p>
11 pub after_commit_specifier: ::std::option::Option<::std::string::String>,
12 /// <p>The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If <code>beforePath</code> and <code>afterPath</code> are not specified, differences are shown for all paths.</p>
13 pub before_path: ::std::option::Option<::std::string::String>,
14 /// <p>The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences are shown for all paths.</p>
15 pub after_path: ::std::option::Option<::std::string::String>,
16 /// <p>A non-zero, non-negative integer used to limit the number of returned results.</p>
17 pub max_results: ::std::option::Option<i32>,
18 /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
19 pub next_token: ::std::option::Option<::std::string::String>,
20}
21impl GetDifferencesInput {
22 /// <p>The name of the repository where you want to get differences.</p>
23 pub fn repository_name(&self) -> ::std::option::Option<&str> {
24 self.repository_name.as_deref()
25 }
26 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, the full commit ID). Optional. If not specified, all changes before the <code>afterCommitSpecifier</code> value are shown. If you do not use <code>beforeCommitSpecifier</code> in your request, consider limiting the results with <code>maxResults</code>.</p>
27 pub fn before_commit_specifier(&self) -> ::std::option::Option<&str> {
28 self.before_commit_specifier.as_deref()
29 }
30 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit.</p>
31 pub fn after_commit_specifier(&self) -> ::std::option::Option<&str> {
32 self.after_commit_specifier.as_deref()
33 }
34 /// <p>The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If <code>beforePath</code> and <code>afterPath</code> are not specified, differences are shown for all paths.</p>
35 pub fn before_path(&self) -> ::std::option::Option<&str> {
36 self.before_path.as_deref()
37 }
38 /// <p>The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences are shown for all paths.</p>
39 pub fn after_path(&self) -> ::std::option::Option<&str> {
40 self.after_path.as_deref()
41 }
42 /// <p>A non-zero, non-negative integer used to limit the number of returned results.</p>
43 pub fn max_results(&self) -> ::std::option::Option<i32> {
44 self.max_results
45 }
46 /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
47 pub fn next_token(&self) -> ::std::option::Option<&str> {
48 self.next_token.as_deref()
49 }
50}
51impl GetDifferencesInput {
52 /// Creates a new builder-style object to manufacture [`GetDifferencesInput`](crate::operation::get_differences::GetDifferencesInput).
53 pub fn builder() -> crate::operation::get_differences::builders::GetDifferencesInputBuilder {
54 crate::operation::get_differences::builders::GetDifferencesInputBuilder::default()
55 }
56}
57
58/// A builder for [`GetDifferencesInput`](crate::operation::get_differences::GetDifferencesInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct GetDifferencesInputBuilder {
62 pub(crate) repository_name: ::std::option::Option<::std::string::String>,
63 pub(crate) before_commit_specifier: ::std::option::Option<::std::string::String>,
64 pub(crate) after_commit_specifier: ::std::option::Option<::std::string::String>,
65 pub(crate) before_path: ::std::option::Option<::std::string::String>,
66 pub(crate) after_path: ::std::option::Option<::std::string::String>,
67 pub(crate) max_results: ::std::option::Option<i32>,
68 pub(crate) next_token: ::std::option::Option<::std::string::String>,
69}
70impl GetDifferencesInputBuilder {
71 /// <p>The name of the repository where you want to get differences.</p>
72 /// This field is required.
73 pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.repository_name = ::std::option::Option::Some(input.into());
75 self
76 }
77 /// <p>The name of the repository where you want to get differences.</p>
78 pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.repository_name = input;
80 self
81 }
82 /// <p>The name of the repository where you want to get differences.</p>
83 pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
84 &self.repository_name
85 }
86 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, the full commit ID). Optional. If not specified, all changes before the <code>afterCommitSpecifier</code> value are shown. If you do not use <code>beforeCommitSpecifier</code> in your request, consider limiting the results with <code>maxResults</code>.</p>
87 pub fn before_commit_specifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.before_commit_specifier = ::std::option::Option::Some(input.into());
89 self
90 }
91 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, the full commit ID). Optional. If not specified, all changes before the <code>afterCommitSpecifier</code> value are shown. If you do not use <code>beforeCommitSpecifier</code> in your request, consider limiting the results with <code>maxResults</code>.</p>
92 pub fn set_before_commit_specifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.before_commit_specifier = input;
94 self
95 }
96 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, the full commit ID). Optional. If not specified, all changes before the <code>afterCommitSpecifier</code> value are shown. If you do not use <code>beforeCommitSpecifier</code> in your request, consider limiting the results with <code>maxResults</code>.</p>
97 pub fn get_before_commit_specifier(&self) -> &::std::option::Option<::std::string::String> {
98 &self.before_commit_specifier
99 }
100 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit.</p>
101 /// This field is required.
102 pub fn after_commit_specifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.after_commit_specifier = ::std::option::Option::Some(input.into());
104 self
105 }
106 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit.</p>
107 pub fn set_after_commit_specifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.after_commit_specifier = input;
109 self
110 }
111 /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit.</p>
112 pub fn get_after_commit_specifier(&self) -> &::std::option::Option<::std::string::String> {
113 &self.after_commit_specifier
114 }
115 /// <p>The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If <code>beforePath</code> and <code>afterPath</code> are not specified, differences are shown for all paths.</p>
116 pub fn before_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.before_path = ::std::option::Option::Some(input.into());
118 self
119 }
120 /// <p>The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If <code>beforePath</code> and <code>afterPath</code> are not specified, differences are shown for all paths.</p>
121 pub fn set_before_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.before_path = input;
123 self
124 }
125 /// <p>The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If <code>beforePath</code> and <code>afterPath</code> are not specified, differences are shown for all paths.</p>
126 pub fn get_before_path(&self) -> &::std::option::Option<::std::string::String> {
127 &self.before_path
128 }
129 /// <p>The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences are shown for all paths.</p>
130 pub fn after_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.after_path = ::std::option::Option::Some(input.into());
132 self
133 }
134 /// <p>The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences are shown for all paths.</p>
135 pub fn set_after_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.after_path = input;
137 self
138 }
139 /// <p>The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences are shown for all paths.</p>
140 pub fn get_after_path(&self) -> &::std::option::Option<::std::string::String> {
141 &self.after_path
142 }
143 /// <p>A non-zero, non-negative integer used to limit the number of returned results.</p>
144 pub fn max_results(mut self, input: i32) -> Self {
145 self.max_results = ::std::option::Option::Some(input);
146 self
147 }
148 /// <p>A non-zero, non-negative integer used to limit the number of returned results.</p>
149 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
150 self.max_results = input;
151 self
152 }
153 /// <p>A non-zero, non-negative integer used to limit the number of returned results.</p>
154 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
155 &self.max_results
156 }
157 /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
158 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.next_token = ::std::option::Option::Some(input.into());
160 self
161 }
162 /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
163 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.next_token = input;
165 self
166 }
167 /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
168 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
169 &self.next_token
170 }
171 /// Consumes the builder and constructs a [`GetDifferencesInput`](crate::operation::get_differences::GetDifferencesInput).
172 pub fn build(
173 self,
174 ) -> ::std::result::Result<crate::operation::get_differences::GetDifferencesInput, ::aws_smithy_types::error::operation::BuildError> {
175 ::std::result::Result::Ok(crate::operation::get_differences::GetDifferencesInput {
176 repository_name: self.repository_name,
177 before_commit_specifier: self.before_commit_specifier,
178 after_commit_specifier: self.after_commit_specifier,
179 before_path: self.before_path,
180 after_path: self.after_path,
181 max_results: self.max_results,
182 next_token: self.next_token,
183 })
184 }
185}