#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BedrockKnowledgeStoreConfiguration {
pub bedrock_knowledge_base_arn: ::std::string::String,
}
impl BedrockKnowledgeStoreConfiguration {
pub fn bedrock_knowledge_base_arn(&self) -> &str {
use std::ops::Deref;
self.bedrock_knowledge_base_arn.deref()
}
}
impl BedrockKnowledgeStoreConfiguration {
pub fn builder() -> crate::types::builders::BedrockKnowledgeStoreConfigurationBuilder {
crate::types::builders::BedrockKnowledgeStoreConfigurationBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct BedrockKnowledgeStoreConfigurationBuilder {
pub(crate) bedrock_knowledge_base_arn: ::std::option::Option<::std::string::String>,
}
impl BedrockKnowledgeStoreConfigurationBuilder {
pub fn bedrock_knowledge_base_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bedrock_knowledge_base_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_bedrock_knowledge_base_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bedrock_knowledge_base_arn = input;
self
}
pub fn get_bedrock_knowledge_base_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.bedrock_knowledge_base_arn
}
pub fn build(self) -> ::std::result::Result<crate::types::BedrockKnowledgeStoreConfiguration, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::BedrockKnowledgeStoreConfiguration {
bedrock_knowledge_base_arn: self.bedrock_knowledge_base_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"bedrock_knowledge_base_arn",
"bedrock_knowledge_base_arn was not specified but it is required when building BedrockKnowledgeStoreConfiguration",
)
})?,
})
}
}