Skip to content

Commit 3508012

Browse files
chore: update amzn-codewhisperer-client (#1872)
1 parent 6add3f9 commit 3508012

File tree

5 files changed

+39
-2
lines changed

5 files changed

+39
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/amzn-codewhisperer-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[package]
1313
edition = "2021"
1414
name = "amzn-codewhisperer-client"
15-
version = "0.1.8200"
15+
version = "0.1.8646"
1616
authors = ["Grant Gurvis <grangurv@amazon.com>"]
1717
build = false
1818
exclude = [

crates/amzn-codewhisperer-client/src/config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ impl Builder {
609609
/// # Examples
610610
///
611611
/// Disabling identity caching:
612+
///
612613
/// ```no_run
613614
/// use amzn_codewhisperer_client::config::IdentityCache;
614615
///
@@ -620,6 +621,7 @@ impl Builder {
620621
/// ```
621622
///
622623
/// Customizing lazy caching:
624+
///
623625
/// ```no_run
624626
/// use std::time::Duration;
625627
///
@@ -656,6 +658,7 @@ impl Builder {
656658
/// # Examples
657659
///
658660
/// Disabling identity caching:
661+
///
659662
/// ```no_run
660663
/// use amzn_codewhisperer_client::config::IdentityCache;
661664
///
@@ -667,6 +670,7 @@ impl Builder {
667670
/// ```
668671
///
669672
/// Customizing lazy caching:
673+
///
670674
/// ```no_run
671675
/// use std::time::Duration;
672676
///
@@ -1167,6 +1171,7 @@ impl Builder {
11671171
///
11681172
/// Set the behavior major version to `latest`. This is equivalent to enabling the
11691173
/// `behavior-version-latest` cargo feature.
1174+
///
11701175
/// ```no_run
11711176
/// use amzn_codewhisperer_client::config::BehaviorVersion;
11721177
///
@@ -1178,6 +1183,7 @@ impl Builder {
11781183
/// ```
11791184
///
11801185
/// Customizing behavior major version:
1186+
///
11811187
/// ```no_run
11821188
/// use amzn_codewhisperer_client::config::BehaviorVersion;
11831189
///

crates/amzn-codewhisperer-client/src/protocol_serde/shape_user_input_message.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ pub fn ser_user_input_message(
3030
}
3131
array_6.finish();
3232
}
33+
if let Some(var_9) = &input.model_id {
34+
object.key("modelId").string(var_9.as_str());
35+
}
3336
Ok(())
3437
}

crates/amzn-codewhisperer-client/src/types/_user_input_message.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ pub struct UserInputMessage {
1414
pub origin: ::std::option::Option<crate::types::Origin>,
1515
/// Images associated with the Chat Message.
1616
pub images: ::std::option::Option<::std::vec::Vec<crate::types::ImageBlock>>,
17+
/// Unique identifier for the model used in this conversation
18+
pub model_id: ::std::option::Option<::std::string::String>,
1719
}
1820
impl UserInputMessage {
1921
/// The content of the chat message.
@@ -44,6 +46,11 @@ impl UserInputMessage {
4446
pub fn images(&self) -> &[crate::types::ImageBlock] {
4547
self.images.as_deref().unwrap_or_default()
4648
}
49+
50+
/// Unique identifier for the model used in this conversation
51+
pub fn model_id(&self) -> ::std::option::Option<&str> {
52+
self.model_id.as_deref()
53+
}
4754
}
4855
impl ::std::fmt::Debug for UserInputMessage {
4956
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
@@ -53,6 +60,7 @@ impl ::std::fmt::Debug for UserInputMessage {
5360
formatter.field("user_intent", &self.user_intent);
5461
formatter.field("origin", &self.origin);
5562
formatter.field("images", &self.images);
63+
formatter.field("model_id", &self.model_id);
5664
formatter.finish()
5765
}
5866
}
@@ -73,6 +81,7 @@ pub struct UserInputMessageBuilder {
7381
pub(crate) user_intent: ::std::option::Option<crate::types::UserIntent>,
7482
pub(crate) origin: ::std::option::Option<crate::types::Origin>,
7583
pub(crate) images: ::std::option::Option<::std::vec::Vec<crate::types::ImageBlock>>,
84+
pub(crate) model_id: ::std::option::Option<::std::string::String>,
7685
}
7786
impl UserInputMessageBuilder {
7887
/// The content of the chat message.
@@ -170,6 +179,23 @@ impl UserInputMessageBuilder {
170179
&self.images
171180
}
172181

182+
/// Unique identifier for the model used in this conversation
183+
pub fn model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184+
self.model_id = ::std::option::Option::Some(input.into());
185+
self
186+
}
187+
188+
/// Unique identifier for the model used in this conversation
189+
pub fn set_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190+
self.model_id = input;
191+
self
192+
}
193+
194+
/// Unique identifier for the model used in this conversation
195+
pub fn get_model_id(&self) -> &::std::option::Option<::std::string::String> {
196+
&self.model_id
197+
}
198+
173199
/// Consumes the builder and constructs a [`UserInputMessage`](crate::types::UserInputMessage).
174200
/// This method will fail if any of the following fields are not set:
175201
/// - [`content`](crate::types::builders::UserInputMessageBuilder::content)
@@ -187,6 +213,7 @@ impl UserInputMessageBuilder {
187213
user_intent: self.user_intent,
188214
origin: self.origin,
189215
images: self.images,
216+
model_id: self.model_id,
190217
})
191218
}
192219
}
@@ -198,6 +225,7 @@ impl ::std::fmt::Debug for UserInputMessageBuilder {
198225
formatter.field("user_intent", &self.user_intent);
199226
formatter.field("origin", &self.origin);
200227
formatter.field("images", &self.images);
228+
formatter.field("model_id", &self.model_id);
201229
formatter.finish()
202230
}
203231
}

0 commit comments

Comments
 (0)