aws-sdk-opensearch 1.121.0

AWS SDK for Amazon OpenSearch Service
Documentation
// 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,
        })
    }
}