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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartContentUploadInput {
/// <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. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
pub knowledge_base_id: ::std::option::Option<::std::string::String>,
/// <p>The type of content to upload.</p>
pub content_type: ::std::option::Option<::std::string::String>,
/// <p>The expected expiration time of the generated presigned URL, specified in minutes.</p>
pub presigned_url_time_to_live: ::std::option::Option<i32>,
}
impl StartContentUploadInput {
/// <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. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
pub fn knowledge_base_id(&self) -> ::std::option::Option<&str> {
self.knowledge_base_id.as_deref()
}
/// <p>The type of content to upload.</p>
pub fn content_type(&self) -> ::std::option::Option<&str> {
self.content_type.as_deref()
}
/// <p>The expected expiration time of the generated presigned URL, specified in minutes.</p>
pub fn presigned_url_time_to_live(&self) -> ::std::option::Option<i32> {
self.presigned_url_time_to_live
}
}
impl StartContentUploadInput {
/// Creates a new builder-style object to manufacture [`StartContentUploadInput`](crate::operation::start_content_upload::StartContentUploadInput).
pub fn builder() -> crate::operation::start_content_upload::builders::StartContentUploadInputBuilder {
crate::operation::start_content_upload::builders::StartContentUploadInputBuilder::default()
}
}
/// A builder for [`StartContentUploadInput`](crate::operation::start_content_upload::StartContentUploadInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartContentUploadInputBuilder {
pub(crate) knowledge_base_id: ::std::option::Option<::std::string::String>,
pub(crate) content_type: ::std::option::Option<::std::string::String>,
pub(crate) presigned_url_time_to_live: ::std::option::Option<i32>,
}
impl StartContentUploadInputBuilder {
/// <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. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
/// This field is required.
pub fn knowledge_base_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.knowledge_base_id = ::std::option::Option::Some(input.into());
self
}
/// <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. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
pub fn set_knowledge_base_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.knowledge_base_id = input;
self
}
/// <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. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
pub fn get_knowledge_base_id(&self) -> &::std::option::Option<::std::string::String> {
&self.knowledge_base_id
}
/// <p>The type of content to upload.</p>
/// This field is required.
pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.content_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of content to upload.</p>
pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content_type = input;
self
}
/// <p>The type of content to upload.</p>
pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
&self.content_type
}
/// <p>The expected expiration time of the generated presigned URL, specified in minutes.</p>
pub fn presigned_url_time_to_live(mut self, input: i32) -> Self {
self.presigned_url_time_to_live = ::std::option::Option::Some(input);
self
}
/// <p>The expected expiration time of the generated presigned URL, specified in minutes.</p>
pub fn set_presigned_url_time_to_live(mut self, input: ::std::option::Option<i32>) -> Self {
self.presigned_url_time_to_live = input;
self
}
/// <p>The expected expiration time of the generated presigned URL, specified in minutes.</p>
pub fn get_presigned_url_time_to_live(&self) -> &::std::option::Option<i32> {
&self.presigned_url_time_to_live
}
/// Consumes the builder and constructs a [`StartContentUploadInput`](crate::operation::start_content_upload::StartContentUploadInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::start_content_upload::StartContentUploadInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::start_content_upload::StartContentUploadInput {
knowledge_base_id: self.knowledge_base_id,
content_type: self.content_type,
presigned_url_time_to_live: self.presigned_url_time_to_live,
})
}
}