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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// 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 UpdateSpaceInput {
/// <p>The ID of the space to update.</p>
pub space_id: ::std::option::Option<::std::string::String>,
/// <p>The complete new list of memory strategies. The service removes strategies that aren't in the list from the space. Removing a strategy stops extraction for it but doesn't delete its memories: they're kept, until they expire if the space sets <code>memoryExpiryDays</code>, and they're available again if you later add a strategy with the same <code>type</code> and <code>name</code>. To delete them, use <code>DeleteMemory</code> before you remove the strategy, or delete the space.</p>
/// <p>To keep a strategy, include it with the same <code>type</code> and <code>name</code> that <code>GetSpace</code> returns. For a kept strategy, any <code>configuration</code> member you omit keeps its current value. It doesn't return to the default, and you can't clear a member once it's set. Omit this field to leave the strategies unchanged. The list must name at least one strategy. You can't remove every strategy from a space with <code>UpdateSpace</code>.</p>
/// <p>The serialized list can be at most 384 KiB.</p>
pub memory_strategies: ::std::option::Option<::std::vec::Vec<crate::types::MemoryStrategy>>,
/// <p>How many days the space keeps each event, from 1 to 365. Omit it to leave the current value unchanged. Events already stored keep the expiry they were written with.</p>
pub event_expiry_days: ::std::option::Option<i32>,
/// <p>How many days the space keeps each memory, from 0 to 3650. 0 means memories never expire. Omit it to leave the current value unchanged. You can't clear the setting. To make memories written from then on never expire, send 0. <code>GetSpace</code> then returns 0.</p>
/// <p>A change applies to memories written after it. Memories already stored keep the expiry they were written with. A memory the service rewrites later, such as a summary it keeps up to date, takes the setting in force at that rewrite. A change moves the space to <code>UPDATING</code>. Sending the value that the space has stored doesn't.</p>
pub memory_expiry_days: ::std::option::Option<i32>,
/// <p>The model that extracts and consolidates memories for every strategy in the space: <code>anthropic.claude-opus-5-5</code> or <code>anthropic.claude-haiku-5-5</code>. Omit it to leave the current value unchanged. Once set, it can't be cleared back to the service default.</p>
pub extraction_model_id: ::std::option::Option<::std::string::String>,
}
impl UpdateSpaceInput {
/// <p>The ID of the space to update.</p>
pub fn space_id(&self) -> ::std::option::Option<&str> {
self.space_id.as_deref()
}
/// <p>The complete new list of memory strategies. The service removes strategies that aren't in the list from the space. Removing a strategy stops extraction for it but doesn't delete its memories: they're kept, until they expire if the space sets <code>memoryExpiryDays</code>, and they're available again if you later add a strategy with the same <code>type</code> and <code>name</code>. To delete them, use <code>DeleteMemory</code> before you remove the strategy, or delete the space.</p>
/// <p>To keep a strategy, include it with the same <code>type</code> and <code>name</code> that <code>GetSpace</code> returns. For a kept strategy, any <code>configuration</code> member you omit keeps its current value. It doesn't return to the default, and you can't clear a member once it's set. Omit this field to leave the strategies unchanged. The list must name at least one strategy. You can't remove every strategy from a space with <code>UpdateSpace</code>.</p>
/// <p>The serialized list can be at most 384 KiB.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.memory_strategies.is_none()`.
pub fn memory_strategies(&self) -> &[crate::types::MemoryStrategy] {
self.memory_strategies.as_deref().unwrap_or_default()
}
/// <p>How many days the space keeps each event, from 1 to 365. Omit it to leave the current value unchanged. Events already stored keep the expiry they were written with.</p>
pub fn event_expiry_days(&self) -> ::std::option::Option<i32> {
self.event_expiry_days
}
/// <p>How many days the space keeps each memory, from 0 to 3650. 0 means memories never expire. Omit it to leave the current value unchanged. You can't clear the setting. To make memories written from then on never expire, send 0. <code>GetSpace</code> then returns 0.</p>
/// <p>A change applies to memories written after it. Memories already stored keep the expiry they were written with. A memory the service rewrites later, such as a summary it keeps up to date, takes the setting in force at that rewrite. A change moves the space to <code>UPDATING</code>. Sending the value that the space has stored doesn't.</p>
pub fn memory_expiry_days(&self) -> ::std::option::Option<i32> {
self.memory_expiry_days
}
/// <p>The model that extracts and consolidates memories for every strategy in the space: <code>anthropic.claude-opus-5-5</code> or <code>anthropic.claude-haiku-5-5</code>. Omit it to leave the current value unchanged. Once set, it can't be cleared back to the service default.</p>
pub fn extraction_model_id(&self) -> ::std::option::Option<&str> {
self.extraction_model_id.as_deref()
}
}
impl UpdateSpaceInput {
/// Creates a new builder-style object to manufacture [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
pub fn builder() -> crate::operation::update_space::builders::UpdateSpaceInputBuilder {
crate::operation::update_space::builders::UpdateSpaceInputBuilder::default()
}
}
/// A builder for [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSpaceInputBuilder {
pub(crate) space_id: ::std::option::Option<::std::string::String>,
pub(crate) memory_strategies: ::std::option::Option<::std::vec::Vec<crate::types::MemoryStrategy>>,
pub(crate) event_expiry_days: ::std::option::Option<i32>,
pub(crate) memory_expiry_days: ::std::option::Option<i32>,
pub(crate) extraction_model_id: ::std::option::Option<::std::string::String>,
}
impl UpdateSpaceInputBuilder {
/// <p>The ID of the space to update.</p>
/// This field is required.
pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.space_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the space to update.</p>
pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.space_id = input;
self
}
/// <p>The ID of the space to update.</p>
pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
&self.space_id
}
/// Appends an item to `memory_strategies`.
///
/// To override the contents of this collection use [`set_memory_strategies`](Self::set_memory_strategies).
///
/// <p>The complete new list of memory strategies. The service removes strategies that aren't in the list from the space. Removing a strategy stops extraction for it but doesn't delete its memories: they're kept, until they expire if the space sets <code>memoryExpiryDays</code>, and they're available again if you later add a strategy with the same <code>type</code> and <code>name</code>. To delete them, use <code>DeleteMemory</code> before you remove the strategy, or delete the space.</p>
/// <p>To keep a strategy, include it with the same <code>type</code> and <code>name</code> that <code>GetSpace</code> returns. For a kept strategy, any <code>configuration</code> member you omit keeps its current value. It doesn't return to the default, and you can't clear a member once it's set. Omit this field to leave the strategies unchanged. The list must name at least one strategy. You can't remove every strategy from a space with <code>UpdateSpace</code>.</p>
/// <p>The serialized list can be at most 384 KiB.</p>
pub fn memory_strategies(mut self, input: crate::types::MemoryStrategy) -> Self {
let mut v = self.memory_strategies.unwrap_or_default();
v.push(input);
self.memory_strategies = ::std::option::Option::Some(v);
self
}
/// <p>The complete new list of memory strategies. The service removes strategies that aren't in the list from the space. Removing a strategy stops extraction for it but doesn't delete its memories: they're kept, until they expire if the space sets <code>memoryExpiryDays</code>, and they're available again if you later add a strategy with the same <code>type</code> and <code>name</code>. To delete them, use <code>DeleteMemory</code> before you remove the strategy, or delete the space.</p>
/// <p>To keep a strategy, include it with the same <code>type</code> and <code>name</code> that <code>GetSpace</code> returns. For a kept strategy, any <code>configuration</code> member you omit keeps its current value. It doesn't return to the default, and you can't clear a member once it's set. Omit this field to leave the strategies unchanged. The list must name at least one strategy. You can't remove every strategy from a space with <code>UpdateSpace</code>.</p>
/// <p>The serialized list can be at most 384 KiB.</p>
pub fn set_memory_strategies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MemoryStrategy>>) -> Self {
self.memory_strategies = input;
self
}
/// <p>The complete new list of memory strategies. The service removes strategies that aren't in the list from the space. Removing a strategy stops extraction for it but doesn't delete its memories: they're kept, until they expire if the space sets <code>memoryExpiryDays</code>, and they're available again if you later add a strategy with the same <code>type</code> and <code>name</code>. To delete them, use <code>DeleteMemory</code> before you remove the strategy, or delete the space.</p>
/// <p>To keep a strategy, include it with the same <code>type</code> and <code>name</code> that <code>GetSpace</code> returns. For a kept strategy, any <code>configuration</code> member you omit keeps its current value. It doesn't return to the default, and you can't clear a member once it's set. Omit this field to leave the strategies unchanged. The list must name at least one strategy. You can't remove every strategy from a space with <code>UpdateSpace</code>.</p>
/// <p>The serialized list can be at most 384 KiB.</p>
pub fn get_memory_strategies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MemoryStrategy>> {
&self.memory_strategies
}
/// <p>How many days the space keeps each event, from 1 to 365. Omit it to leave the current value unchanged. Events already stored keep the expiry they were written with.</p>
pub fn event_expiry_days(mut self, input: i32) -> Self {
self.event_expiry_days = ::std::option::Option::Some(input);
self
}
/// <p>How many days the space keeps each event, from 1 to 365. Omit it to leave the current value unchanged. Events already stored keep the expiry they were written with.</p>
pub fn set_event_expiry_days(mut self, input: ::std::option::Option<i32>) -> Self {
self.event_expiry_days = input;
self
}
/// <p>How many days the space keeps each event, from 1 to 365. Omit it to leave the current value unchanged. Events already stored keep the expiry they were written with.</p>
pub fn get_event_expiry_days(&self) -> &::std::option::Option<i32> {
&self.event_expiry_days
}
/// <p>How many days the space keeps each memory, from 0 to 3650. 0 means memories never expire. Omit it to leave the current value unchanged. You can't clear the setting. To make memories written from then on never expire, send 0. <code>GetSpace</code> then returns 0.</p>
/// <p>A change applies to memories written after it. Memories already stored keep the expiry they were written with. A memory the service rewrites later, such as a summary it keeps up to date, takes the setting in force at that rewrite. A change moves the space to <code>UPDATING</code>. Sending the value that the space has stored doesn't.</p>
pub fn memory_expiry_days(mut self, input: i32) -> Self {
self.memory_expiry_days = ::std::option::Option::Some(input);
self
}
/// <p>How many days the space keeps each memory, from 0 to 3650. 0 means memories never expire. Omit it to leave the current value unchanged. You can't clear the setting. To make memories written from then on never expire, send 0. <code>GetSpace</code> then returns 0.</p>
/// <p>A change applies to memories written after it. Memories already stored keep the expiry they were written with. A memory the service rewrites later, such as a summary it keeps up to date, takes the setting in force at that rewrite. A change moves the space to <code>UPDATING</code>. Sending the value that the space has stored doesn't.</p>
pub fn set_memory_expiry_days(mut self, input: ::std::option::Option<i32>) -> Self {
self.memory_expiry_days = input;
self
}
/// <p>How many days the space keeps each memory, from 0 to 3650. 0 means memories never expire. Omit it to leave the current value unchanged. You can't clear the setting. To make memories written from then on never expire, send 0. <code>GetSpace</code> then returns 0.</p>
/// <p>A change applies to memories written after it. Memories already stored keep the expiry they were written with. A memory the service rewrites later, such as a summary it keeps up to date, takes the setting in force at that rewrite. A change moves the space to <code>UPDATING</code>. Sending the value that the space has stored doesn't.</p>
pub fn get_memory_expiry_days(&self) -> &::std::option::Option<i32> {
&self.memory_expiry_days
}
/// <p>The model that extracts and consolidates memories for every strategy in the space: <code>anthropic.claude-opus-5-5</code> or <code>anthropic.claude-haiku-5-5</code>. Omit it to leave the current value unchanged. Once set, it can't be cleared back to the service default.</p>
pub fn extraction_model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.extraction_model_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The model that extracts and consolidates memories for every strategy in the space: <code>anthropic.claude-opus-5-5</code> or <code>anthropic.claude-haiku-5-5</code>. Omit it to leave the current value unchanged. Once set, it can't be cleared back to the service default.</p>
pub fn set_extraction_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.extraction_model_id = input;
self
}
/// <p>The model that extracts and consolidates memories for every strategy in the space: <code>anthropic.claude-opus-5-5</code> or <code>anthropic.claude-haiku-5-5</code>. Omit it to leave the current value unchanged. Once set, it can't be cleared back to the service default.</p>
pub fn get_extraction_model_id(&self) -> &::std::option::Option<::std::string::String> {
&self.extraction_model_id
}
/// Consumes the builder and constructs a [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
pub fn build(self) -> ::std::result::Result<crate::operation::update_space::UpdateSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_space::UpdateSpaceInput {
space_id: self.space_id,
memory_strategies: self.memory_strategies,
event_expiry_days: self.event_expiry_days,
memory_expiry_days: self.memory_expiry_days,
extraction_model_id: self.extraction_model_id,
})
}
}