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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// 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)]
pub struct CreateEnvironmentConnectionOutput {
/// <p>The status of the connection. To get the other attributes of the connection, call <code>ListEnvironmentConnections</code>.</p>
pub status: crate::types::ConnectionStatus,
/// <p>The URL to open in a browser to approve access at GitHub or Microsoft. The response includes this URL only for a <code>github</code> or <code>sharepoint</code> connection with a status of <code>PENDING</code>. The connection becomes <code>ACTIVE</code> after you approve access.</p>
/// <p>The response includes this URL only once. If you lose it, call <code>CreateEnvironmentConnection</code> again.</p>
pub authorization_url: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateEnvironmentConnectionOutput {
/// <p>The status of the connection. To get the other attributes of the connection, call <code>ListEnvironmentConnections</code>.</p>
pub fn status(&self) -> &crate::types::ConnectionStatus {
&self.status
}
/// <p>The URL to open in a browser to approve access at GitHub or Microsoft. The response includes this URL only for a <code>github</code> or <code>sharepoint</code> connection with a status of <code>PENDING</code>. The connection becomes <code>ACTIVE</code> after you approve access.</p>
/// <p>The response includes this URL only once. If you lose it, call <code>CreateEnvironmentConnection</code> again.</p>
pub fn authorization_url(&self) -> ::std::option::Option<&str> {
self.authorization_url.as_deref()
}
}
impl ::std::fmt::Debug for CreateEnvironmentConnectionOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateEnvironmentConnectionOutput");
formatter.field("status", &self.status);
formatter.field("authorization_url", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for CreateEnvironmentConnectionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateEnvironmentConnectionOutput {
/// Creates a new builder-style object to manufacture [`CreateEnvironmentConnectionOutput`](crate::operation::create_environment_connection::CreateEnvironmentConnectionOutput).
pub fn builder() -> crate::operation::create_environment_connection::builders::CreateEnvironmentConnectionOutputBuilder {
crate::operation::create_environment_connection::builders::CreateEnvironmentConnectionOutputBuilder::default()
}
}
/// A builder for [`CreateEnvironmentConnectionOutput`](crate::operation::create_environment_connection::CreateEnvironmentConnectionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateEnvironmentConnectionOutputBuilder {
pub(crate) status: ::std::option::Option<crate::types::ConnectionStatus>,
pub(crate) authorization_url: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateEnvironmentConnectionOutputBuilder {
/// <p>The status of the connection. To get the other attributes of the connection, call <code>ListEnvironmentConnections</code>.</p>
/// This field is required.
pub fn status(mut self, input: crate::types::ConnectionStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The status of the connection. To get the other attributes of the connection, call <code>ListEnvironmentConnections</code>.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ConnectionStatus>) -> Self {
self.status = input;
self
}
/// <p>The status of the connection. To get the other attributes of the connection, call <code>ListEnvironmentConnections</code>.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::ConnectionStatus> {
&self.status
}
/// <p>The URL to open in a browser to approve access at GitHub or Microsoft. The response includes this URL only for a <code>github</code> or <code>sharepoint</code> connection with a status of <code>PENDING</code>. The connection becomes <code>ACTIVE</code> after you approve access.</p>
/// <p>The response includes this URL only once. If you lose it, call <code>CreateEnvironmentConnection</code> again.</p>
pub fn authorization_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.authorization_url = ::std::option::Option::Some(input.into());
self
}
/// <p>The URL to open in a browser to approve access at GitHub or Microsoft. The response includes this URL only for a <code>github</code> or <code>sharepoint</code> connection with a status of <code>PENDING</code>. The connection becomes <code>ACTIVE</code> after you approve access.</p>
/// <p>The response includes this URL only once. If you lose it, call <code>CreateEnvironmentConnection</code> again.</p>
pub fn set_authorization_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.authorization_url = input;
self
}
/// <p>The URL to open in a browser to approve access at GitHub or Microsoft. The response includes this URL only for a <code>github</code> or <code>sharepoint</code> connection with a status of <code>PENDING</code>. The connection becomes <code>ACTIVE</code> after you approve access.</p>
/// <p>The response includes this URL only once. If you lose it, call <code>CreateEnvironmentConnection</code> again.</p>
pub fn get_authorization_url(&self) -> &::std::option::Option<::std::string::String> {
&self.authorization_url
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`CreateEnvironmentConnectionOutput`](crate::operation::create_environment_connection::CreateEnvironmentConnectionOutput).
/// This method will fail if any of the following fields are not set:
/// - [`status`](crate::operation::create_environment_connection::builders::CreateEnvironmentConnectionOutputBuilder::status)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_environment_connection::CreateEnvironmentConnectionOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_environment_connection::CreateEnvironmentConnectionOutput {
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building CreateEnvironmentConnectionOutput",
)
})?,
authorization_url: self.authorization_url,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for CreateEnvironmentConnectionOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateEnvironmentConnectionOutputBuilder");
formatter.field("status", &self.status);
formatter.field("authorization_url", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}