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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>This API is in preview release for Amazon Connect and is subject to change.</p>
/// <p>A third-party application's metadata.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Application {
/// <p>Namespace of the application that you want to give access to.</p>
pub namespace: ::std::option::Option<::std::string::String>,
/// <p>The permissions that the agent is granted on the application. For third-party applications, only the <code>ACCESS</code> permission is supported. For MCP Servers, the permissions are tool Identifiers accepted by MCP Server.</p>
pub application_permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Type of Application.</p>
pub r#type: ::std::option::Option<crate::types::ApplicationType>,
}
impl Application {
/// <p>Namespace of the application that you want to give access to.</p>
pub fn namespace(&self) -> ::std::option::Option<&str> {
self.namespace.as_deref()
}
/// <p>The permissions that the agent is granted on the application. For third-party applications, only the <code>ACCESS</code> permission is supported. For MCP Servers, the permissions are tool Identifiers accepted by MCP Server.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.application_permissions.is_none()`.
pub fn application_permissions(&self) -> &[::std::string::String] {
self.application_permissions.as_deref().unwrap_or_default()
}
/// <p>Type of Application.</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::ApplicationType> {
self.r#type.as_ref()
}
}
impl Application {
/// Creates a new builder-style object to manufacture [`Application`](crate::types::Application).
pub fn builder() -> crate::types::builders::ApplicationBuilder {
crate::types::builders::ApplicationBuilder::default()
}
}
/// A builder for [`Application`](crate::types::Application).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ApplicationBuilder {
pub(crate) namespace: ::std::option::Option<::std::string::String>,
pub(crate) application_permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) r#type: ::std::option::Option<crate::types::ApplicationType>,
}
impl ApplicationBuilder {
/// <p>Namespace of the application that you want to give access to.</p>
pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.namespace = ::std::option::Option::Some(input.into());
self
}
/// <p>Namespace of the application that you want to give access to.</p>
pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.namespace = input;
self
}
/// <p>Namespace of the application that you want to give access to.</p>
pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
&self.namespace
}
/// Appends an item to `application_permissions`.
///
/// To override the contents of this collection use [`set_application_permissions`](Self::set_application_permissions).
///
/// <p>The permissions that the agent is granted on the application. For third-party applications, only the <code>ACCESS</code> permission is supported. For MCP Servers, the permissions are tool Identifiers accepted by MCP Server.</p>
pub fn application_permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.application_permissions.unwrap_or_default();
v.push(input.into());
self.application_permissions = ::std::option::Option::Some(v);
self
}
/// <p>The permissions that the agent is granted on the application. For third-party applications, only the <code>ACCESS</code> permission is supported. For MCP Servers, the permissions are tool Identifiers accepted by MCP Server.</p>
pub fn set_application_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.application_permissions = input;
self
}
/// <p>The permissions that the agent is granted on the application. For third-party applications, only the <code>ACCESS</code> permission is supported. For MCP Servers, the permissions are tool Identifiers accepted by MCP Server.</p>
pub fn get_application_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.application_permissions
}
/// <p>Type of Application.</p>
pub fn r#type(mut self, input: crate::types::ApplicationType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>Type of Application.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::ApplicationType>) -> Self {
self.r#type = input;
self
}
/// <p>Type of Application.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::ApplicationType> {
&self.r#type
}
/// Consumes the builder and constructs a [`Application`](crate::types::Application).
pub fn build(self) -> crate::types::Application {
crate::types::Application {
namespace: self.namespace,
application_permissions: self.application_permissions,
r#type: self.r#type,
}
}
}