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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The repository to be created in AWS CodeStar. Valid values are AWS CodeCommit or GitHub. After AWS CodeStar provisions the new repository, the source code files provided with the project request are placed in the repository.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CodeDestination {
    /// <p>Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub code_commit: ::std::option::Option<crate::types::CodeCommitCodeDestination>,
    /// <p>Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub git_hub: ::std::option::Option<crate::types::GitHubCodeDestination>,
}
impl CodeDestination {
    /// <p>Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub fn code_commit(&self) -> ::std::option::Option<&crate::types::CodeCommitCodeDestination> {
        self.code_commit.as_ref()
    }
    /// <p>Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub fn git_hub(&self) -> ::std::option::Option<&crate::types::GitHubCodeDestination> {
        self.git_hub.as_ref()
    }
}
impl CodeDestination {
    /// Creates a new builder-style object to manufacture [`CodeDestination`](crate::types::CodeDestination).
    pub fn builder() -> crate::types::builders::CodeDestinationBuilder {
        crate::types::builders::CodeDestinationBuilder::default()
    }
}

/// A builder for [`CodeDestination`](crate::types::CodeDestination).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CodeDestinationBuilder {
    pub(crate) code_commit: ::std::option::Option<crate::types::CodeCommitCodeDestination>,
    pub(crate) git_hub: ::std::option::Option<crate::types::GitHubCodeDestination>,
}
impl CodeDestinationBuilder {
    /// <p>Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub fn code_commit(mut self, input: crate::types::CodeCommitCodeDestination) -> Self {
        self.code_commit = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub fn set_code_commit(mut self, input: ::std::option::Option<crate::types::CodeCommitCodeDestination>) -> Self {
        self.code_commit = input;
        self
    }
    /// <p>Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub fn get_code_commit(&self) -> &::std::option::Option<crate::types::CodeCommitCodeDestination> {
        &self.code_commit
    }
    /// <p>Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub fn git_hub(mut self, input: crate::types::GitHubCodeDestination) -> Self {
        self.git_hub = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub fn set_git_hub(mut self, input: ::std::option::Option<crate::types::GitHubCodeDestination>) -> Self {
        self.git_hub = input;
        self
    }
    /// <p>Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.</p>
    pub fn get_git_hub(&self) -> &::std::option::Option<crate::types::GitHubCodeDestination> {
        &self.git_hub
    }
    /// Consumes the builder and constructs a [`CodeDestination`](crate::types::CodeDestination).
    pub fn build(self) -> crate::types::CodeDestination {
        crate::types::CodeDestination {
            code_commit: self.code_commit,
            git_hub: self.git_hub,
        }
    }
}