1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`PutFile`](crate::operation::put_file::builders::PutFileFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`repository_name(impl Into<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::repository_name) / [`set_repository_name(Option<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_repository_name):<br>required: **true**<br><p>The name of the repository where you want to add or update the file.</p><br>
    ///   - [`branch_name(impl Into<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::branch_name) / [`set_branch_name(Option<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_branch_name):<br>required: **true**<br><p>The name of the branch where you want to add or update the file. If this is an empty repository, this branch is created.</p><br>
    ///   - [`file_content(Blob)`](crate::operation::put_file::builders::PutFileFluentBuilder::file_content) / [`set_file_content(Option<Blob>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_file_content):<br>required: **true**<br><p>The content of the file, in binary object format.</p><br>
    ///   - [`file_path(impl Into<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::file_path) / [`set_file_path(Option<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_file_path):<br>required: **true**<br><p>The name of the file you want to add or update, including the relative path to the file in the repository.</p><note>  <p>If the path does not currently exist in the repository, the path is created as part of adding the file.</p> </note><br>
    ///   - [`file_mode(FileModeTypeEnum)`](crate::operation::put_file::builders::PutFileFluentBuilder::file_mode) / [`set_file_mode(Option<FileModeTypeEnum>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_file_mode):<br>required: **false**<br><p>The file mode permissions of the blob. Valid file mode permissions are listed here.</p><br>
    ///   - [`parent_commit_id(impl Into<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::parent_commit_id) / [`set_parent_commit_id(Option<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_parent_commit_id):<br>required: **false**<br><p>The full commit ID of the head commit in the branch where you want to add or update the file. If this is an empty repository, no commit ID is required. If this is not an empty repository, a commit ID is required.</p> <p>The commit ID must match the ID of the head commit at the time of the operation. Otherwise, an error occurs, and the file is not added or updated.</p><br>
    ///   - [`commit_message(impl Into<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::commit_message) / [`set_commit_message(Option<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_commit_message):<br>required: **false**<br><p>A message about why this file was added or updated. Although it is optional, a message makes the commit history for your repository more useful.</p><br>
    ///   - [`name(impl Into<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_name):<br>required: **false**<br><p>The name of the person adding or updating the file. Although it is optional, a name makes the commit history for your repository more useful.</p><br>
    ///   - [`email(impl Into<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::email) / [`set_email(Option<String>)`](crate::operation::put_file::builders::PutFileFluentBuilder::set_email):<br>required: **false**<br><p>An email address for the person adding or updating the file.</p><br>
    /// - On success, responds with [`PutFileOutput`](crate::operation::put_file::PutFileOutput) with field(s):
    ///   - [`commit_id(String)`](crate::operation::put_file::PutFileOutput::commit_id): <p>The full SHA ID of the commit that contains this file change.</p>
    ///   - [`blob_id(String)`](crate::operation::put_file::PutFileOutput::blob_id): <p>The ID of the blob, which is its SHA-1 pointer.</p>
    ///   - [`tree_id(String)`](crate::operation::put_file::PutFileOutput::tree_id): <p>The full SHA-1 pointer of the tree information for the commit that contains this file change.</p>
    /// - On failure, responds with [`SdkError<PutFileError>`](crate::operation::put_file::PutFileError)
    pub fn put_file(&self) -> crate::operation::put_file::builders::PutFileFluentBuilder {
        crate::operation::put_file::builders::PutFileFluentBuilder::new(self.handle.clone())
    }
}