1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetFileInput {
    /// <p>The name of the repository that contains the file.</p>
    pub repository_name: ::std::option::Option<::std::string::String>,
    /// <p>The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.</p>
    pub commit_specifier: ::std::option::Option<::std::string::String>,
    /// <p>The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.</p>
    pub file_path: ::std::option::Option<::std::string::String>,
}
impl GetFileInput {
    /// <p>The name of the repository that contains the file.</p>
    pub fn repository_name(&self) -> ::std::option::Option<&str> {
        self.repository_name.as_deref()
    }
    /// <p>The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.</p>
    pub fn commit_specifier(&self) -> ::std::option::Option<&str> {
        self.commit_specifier.as_deref()
    }
    /// <p>The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.</p>
    pub fn file_path(&self) -> ::std::option::Option<&str> {
        self.file_path.as_deref()
    }
}
impl GetFileInput {
    /// Creates a new builder-style object to manufacture [`GetFileInput`](crate::operation::get_file::GetFileInput).
    pub fn builder() -> crate::operation::get_file::builders::GetFileInputBuilder {
        crate::operation::get_file::builders::GetFileInputBuilder::default()
    }
}

/// A builder for [`GetFileInput`](crate::operation::get_file::GetFileInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetFileInputBuilder {
    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
    pub(crate) commit_specifier: ::std::option::Option<::std::string::String>,
    pub(crate) file_path: ::std::option::Option<::std::string::String>,
}
impl GetFileInputBuilder {
    /// <p>The name of the repository that contains the file.</p>
    /// This field is required.
    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the repository that contains the file.</p>
    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository_name = input;
        self
    }
    /// <p>The name of the repository that contains the file.</p>
    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_name
    }
    /// <p>The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.</p>
    pub fn commit_specifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.commit_specifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.</p>
    pub fn set_commit_specifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.commit_specifier = input;
        self
    }
    /// <p>The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.</p>
    pub fn get_commit_specifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.commit_specifier
    }
    /// <p>The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.</p>
    /// This field is required.
    pub fn file_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.file_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.</p>
    pub fn set_file_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.file_path = input;
        self
    }
    /// <p>The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.</p>
    pub fn get_file_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.file_path
    }
    /// Consumes the builder and constructs a [`GetFileInput`](crate::operation::get_file::GetFileInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_file::GetFileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_file::GetFileInput {
            repository_name: self.repository_name,
            commit_specifier: self.commit_specifier,
            file_path: self.file_path,
        })
    }
}