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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Container for the parameters to the <code>RegisterCapability</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RegisterCapabilityInput {
/// <p>The unique identifier of the OpenSearch UI application to register the capability for.</p>
pub application_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the capability to register. Must be between 3 and 30 characters and contain only alphanumeric characters and hyphens. This identifies the type of capability being enabled for the application. For registering AI Assistant capability, use <code>ai-capability</code></p>
pub capability_name: ::std::option::Option<::std::string::String>,
/// <p>The configuration settings for the capability being registered. This includes capability-specific settings such as AI configuration.</p>
pub capability_config: ::std::option::Option<crate::types::CapabilityBaseRequestConfig>,
}
impl RegisterCapabilityInput {
/// <p>The unique identifier of the OpenSearch UI application to register the capability for.</p>
pub fn application_id(&self) -> ::std::option::Option<&str> {
self.application_id.as_deref()
}
/// <p>The name of the capability to register. Must be between 3 and 30 characters and contain only alphanumeric characters and hyphens. This identifies the type of capability being enabled for the application. For registering AI Assistant capability, use <code>ai-capability</code></p>
pub fn capability_name(&self) -> ::std::option::Option<&str> {
self.capability_name.as_deref()
}
/// <p>The configuration settings for the capability being registered. This includes capability-specific settings such as AI configuration.</p>
pub fn capability_config(&self) -> ::std::option::Option<&crate::types::CapabilityBaseRequestConfig> {
self.capability_config.as_ref()
}
}
impl RegisterCapabilityInput {
/// Creates a new builder-style object to manufacture [`RegisterCapabilityInput`](crate::operation::register_capability::RegisterCapabilityInput).
pub fn builder() -> crate::operation::register_capability::builders::RegisterCapabilityInputBuilder {
crate::operation::register_capability::builders::RegisterCapabilityInputBuilder::default()
}
}
/// A builder for [`RegisterCapabilityInput`](crate::operation::register_capability::RegisterCapabilityInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RegisterCapabilityInputBuilder {
pub(crate) application_id: ::std::option::Option<::std::string::String>,
pub(crate) capability_name: ::std::option::Option<::std::string::String>,
pub(crate) capability_config: ::std::option::Option<crate::types::CapabilityBaseRequestConfig>,
}
impl RegisterCapabilityInputBuilder {
/// <p>The unique identifier of the OpenSearch UI application to register the capability for.</p>
/// This field is required.
pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.application_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the OpenSearch UI application to register the capability for.</p>
pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.application_id = input;
self
}
/// <p>The unique identifier of the OpenSearch UI application to register the capability for.</p>
pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
&self.application_id
}
/// <p>The name of the capability to register. Must be between 3 and 30 characters and contain only alphanumeric characters and hyphens. This identifies the type of capability being enabled for the application. For registering AI Assistant capability, use <code>ai-capability</code></p>
/// This field is required.
pub fn capability_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.capability_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the capability to register. Must be between 3 and 30 characters and contain only alphanumeric characters and hyphens. This identifies the type of capability being enabled for the application. For registering AI Assistant capability, use <code>ai-capability</code></p>
pub fn set_capability_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.capability_name = input;
self
}
/// <p>The name of the capability to register. Must be between 3 and 30 characters and contain only alphanumeric characters and hyphens. This identifies the type of capability being enabled for the application. For registering AI Assistant capability, use <code>ai-capability</code></p>
pub fn get_capability_name(&self) -> &::std::option::Option<::std::string::String> {
&self.capability_name
}
/// <p>The configuration settings for the capability being registered. This includes capability-specific settings such as AI configuration.</p>
/// This field is required.
pub fn capability_config(mut self, input: crate::types::CapabilityBaseRequestConfig) -> Self {
self.capability_config = ::std::option::Option::Some(input);
self
}
/// <p>The configuration settings for the capability being registered. This includes capability-specific settings such as AI configuration.</p>
pub fn set_capability_config(mut self, input: ::std::option::Option<crate::types::CapabilityBaseRequestConfig>) -> Self {
self.capability_config = input;
self
}
/// <p>The configuration settings for the capability being registered. This includes capability-specific settings such as AI configuration.</p>
pub fn get_capability_config(&self) -> &::std::option::Option<crate::types::CapabilityBaseRequestConfig> {
&self.capability_config
}
/// Consumes the builder and constructs a [`RegisterCapabilityInput`](crate::operation::register_capability::RegisterCapabilityInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::register_capability::RegisterCapabilityInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::register_capability::RegisterCapabilityInput {
application_id: self.application_id,
capability_name: self.capability_name,
capability_config: self.capability_config,
})
}
}