aws_sdk_wisdom/types/
_knowledge_base_association_data.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Association information about the knowledge base.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct KnowledgeBaseAssociationData {
7    /// <p>The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.</p>
8    pub knowledge_base_id: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
10    pub knowledge_base_arn: ::std::option::Option<::std::string::String>,
11}
12impl KnowledgeBaseAssociationData {
13    /// <p>The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.</p>
14    pub fn knowledge_base_id(&self) -> ::std::option::Option<&str> {
15        self.knowledge_base_id.as_deref()
16    }
17    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
18    pub fn knowledge_base_arn(&self) -> ::std::option::Option<&str> {
19        self.knowledge_base_arn.as_deref()
20    }
21}
22impl KnowledgeBaseAssociationData {
23    /// Creates a new builder-style object to manufacture [`KnowledgeBaseAssociationData`](crate::types::KnowledgeBaseAssociationData).
24    pub fn builder() -> crate::types::builders::KnowledgeBaseAssociationDataBuilder {
25        crate::types::builders::KnowledgeBaseAssociationDataBuilder::default()
26    }
27}
28
29/// A builder for [`KnowledgeBaseAssociationData`](crate::types::KnowledgeBaseAssociationData).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct KnowledgeBaseAssociationDataBuilder {
33    pub(crate) knowledge_base_id: ::std::option::Option<::std::string::String>,
34    pub(crate) knowledge_base_arn: ::std::option::Option<::std::string::String>,
35}
36impl KnowledgeBaseAssociationDataBuilder {
37    /// <p>The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.</p>
38    pub fn knowledge_base_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.knowledge_base_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.</p>
43    pub fn set_knowledge_base_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.knowledge_base_id = input;
45        self
46    }
47    /// <p>The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it.</p>
48    pub fn get_knowledge_base_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.knowledge_base_id
50    }
51    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
52    pub fn knowledge_base_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.knowledge_base_arn = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
57    pub fn set_knowledge_base_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.knowledge_base_arn = input;
59        self
60    }
61    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
62    pub fn get_knowledge_base_arn(&self) -> &::std::option::Option<::std::string::String> {
63        &self.knowledge_base_arn
64    }
65    /// Consumes the builder and constructs a [`KnowledgeBaseAssociationData`](crate::types::KnowledgeBaseAssociationData).
66    pub fn build(self) -> crate::types::KnowledgeBaseAssociationData {
67        crate::types::KnowledgeBaseAssociationData {
68            knowledge_base_id: self.knowledge_base_id,
69            knowledge_base_arn: self.knowledge_base_arn,
70        }
71    }
72}