Skip to content

Commit 0261ec2

Browse files
chore: Updates runtime models (#3083)
Co-authored-by: Kenneth S. <[email protected]>
1 parent 2bf9270 commit 0261ec2

File tree

78 files changed

+2712
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2712
-546
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
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.10613"
15+
version = "0.1.11582"
1616
authors = ["Grant Gurvis <[email protected]>"]
1717
build = false
1818
exclude = [

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ impl super::Client {
1616
/// - [`code_scan_name(impl Into<String>)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::code_scan_name) / [`set_code_scan_name(Option<String>)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::set_code_scan_name):<br>required: **false**<br>Code analysis scan name<br>
1717
/// - [`code_diff_metadata(CodeDiffMetadata)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::code_diff_metadata) / [`set_code_diff_metadata(Option<CodeDiffMetadata>)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::set_code_diff_metadata):<br>required: **false**<br>(undocumented)<br>
1818
/// - [`profile_arn(impl Into<String>)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::profile_arn) / [`set_profile_arn(Option<String>)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::set_profile_arn):<br>required: **false**<br>(undocumented)<br>
19+
/// - [`language_model_id(impl Into<String>)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::language_model_id) / [`set_language_model_id(Option<String>)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::set_language_model_id):<br>required: **false**<br>Unique identifier for the model<br>
20+
/// - [`client_type(Origin)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::client_type) / [`set_client_type(Option<Origin>)`](crate::operation::start_code_analysis::builders::StartCodeAnalysisFluentBuilder::set_client_type):<br>required: **false**<br>Enum to represent the origin application conversing with Sidekick.<br>
1921
/// - On success, responds with
2022
/// [`StartCodeAnalysisOutput`](crate::operation::start_code_analysis::StartCodeAnalysisOutput)
2123
/// with field(s):

crates/amzn-codewhisperer-client/src/operation/start_code_analysis/_start_code_analysis_input.rs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ pub struct StartCodeAnalysisInput {
1818
pub code_diff_metadata: ::std::option::Option<crate::types::CodeDiffMetadata>,
1919
#[allow(missing_docs)] // documentation missing in model
2020
pub profile_arn: ::std::option::Option<::std::string::String>,
21+
/// Unique identifier for the model
22+
pub language_model_id: ::std::option::Option<::std::string::String>,
23+
/// Enum to represent the origin application conversing with Sidekick.
24+
pub client_type: ::std::option::Option<crate::types::Origin>,
2125
}
2226
impl StartCodeAnalysisInput {
2327
#[allow(missing_docs)] // documentation missing in model
@@ -56,6 +60,16 @@ impl StartCodeAnalysisInput {
5660
pub fn profile_arn(&self) -> ::std::option::Option<&str> {
5761
self.profile_arn.as_deref()
5862
}
63+
64+
/// Unique identifier for the model
65+
pub fn language_model_id(&self) -> ::std::option::Option<&str> {
66+
self.language_model_id.as_deref()
67+
}
68+
69+
/// Enum to represent the origin application conversing with Sidekick.
70+
pub fn client_type(&self) -> ::std::option::Option<&crate::types::Origin> {
71+
self.client_type.as_ref()
72+
}
5973
}
6074
impl StartCodeAnalysisInput {
6175
/// Creates a new builder-style object to manufacture
@@ -78,6 +92,8 @@ pub struct StartCodeAnalysisInputBuilder {
7892
pub(crate) code_scan_name: ::std::option::Option<::std::string::String>,
7993
pub(crate) code_diff_metadata: ::std::option::Option<crate::types::CodeDiffMetadata>,
8094
pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
95+
pub(crate) language_model_id: ::std::option::Option<::std::string::String>,
96+
pub(crate) client_type: ::std::option::Option<crate::types::Origin>,
8197
}
8298
impl StartCodeAnalysisInputBuilder {
8399
/// Adds a key-value pair to `artifacts`.
@@ -213,6 +229,40 @@ impl StartCodeAnalysisInputBuilder {
213229
&self.profile_arn
214230
}
215231

232+
/// Unique identifier for the model
233+
pub fn language_model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234+
self.language_model_id = ::std::option::Option::Some(input.into());
235+
self
236+
}
237+
238+
/// Unique identifier for the model
239+
pub fn set_language_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
240+
self.language_model_id = input;
241+
self
242+
}
243+
244+
/// Unique identifier for the model
245+
pub fn get_language_model_id(&self) -> &::std::option::Option<::std::string::String> {
246+
&self.language_model_id
247+
}
248+
249+
/// Enum to represent the origin application conversing with Sidekick.
250+
pub fn client_type(mut self, input: crate::types::Origin) -> Self {
251+
self.client_type = ::std::option::Option::Some(input);
252+
self
253+
}
254+
255+
/// Enum to represent the origin application conversing with Sidekick.
256+
pub fn set_client_type(mut self, input: ::std::option::Option<crate::types::Origin>) -> Self {
257+
self.client_type = input;
258+
self
259+
}
260+
261+
/// Enum to represent the origin application conversing with Sidekick.
262+
pub fn get_client_type(&self) -> &::std::option::Option<crate::types::Origin> {
263+
&self.client_type
264+
}
265+
216266
/// Consumes the builder and constructs a
217267
/// [`StartCodeAnalysisInput`](crate::operation::start_code_analysis::StartCodeAnalysisInput).
218268
pub fn build(
@@ -229,6 +279,8 @@ impl StartCodeAnalysisInputBuilder {
229279
code_scan_name: self.code_scan_name,
230280
code_diff_metadata: self.code_diff_metadata,
231281
profile_arn: self.profile_arn,
282+
language_model_id: self.language_model_id,
283+
client_type: self.client_type,
232284
})
233285
}
234286
}

crates/amzn-codewhisperer-client/src/operation/start_code_analysis/builders.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,4 +248,38 @@ impl StartCodeAnalysisFluentBuilder {
248248
pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
249249
self.inner.get_profile_arn()
250250
}
251+
252+
/// Unique identifier for the model
253+
pub fn language_model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254+
self.inner = self.inner.language_model_id(input.into());
255+
self
256+
}
257+
258+
/// Unique identifier for the model
259+
pub fn set_language_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260+
self.inner = self.inner.set_language_model_id(input);
261+
self
262+
}
263+
264+
/// Unique identifier for the model
265+
pub fn get_language_model_id(&self) -> &::std::option::Option<::std::string::String> {
266+
self.inner.get_language_model_id()
267+
}
268+
269+
/// Enum to represent the origin application conversing with Sidekick.
270+
pub fn client_type(mut self, input: crate::types::Origin) -> Self {
271+
self.inner = self.inner.client_type(input);
272+
self
273+
}
274+
275+
/// Enum to represent the origin application conversing with Sidekick.
276+
pub fn set_client_type(mut self, input: ::std::option::Option<crate::types::Origin>) -> Self {
277+
self.inner = self.inner.set_client_type(input);
278+
self
279+
}
280+
281+
/// Enum to represent the origin application conversing with Sidekick.
282+
pub fn get_client_type(&self) -> &::std::option::Option<crate::types::Origin> {
283+
self.inner.get_client_type()
284+
}
251285
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ pub(crate) mod shape_notifications_feature;
476476

477477
pub(crate) mod shape_progress_updates;
478478

479+
pub(crate) mod shape_reasoning_content;
480+
479481
pub(crate) mod shape_span;
480482

481483
pub(crate) mod shape_sso_identity_details;
@@ -506,6 +508,8 @@ pub(crate) mod shape_git_state;
506508

507509
pub(crate) mod shape_image_source;
508510

511+
pub(crate) mod shape_reasoning_text;
512+
509513
pub(crate) mod shape_shell_state;
510514

511515
pub(crate) mod shape_target_file_info;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,11 @@ pub fn ser_assistant_response_message(
5757
crate::protocol_serde::shape_cache_point::ser_cache_point(&mut object_17, var_16)?;
5858
object_17.finish();
5959
}
60+
if let Some(var_18) = &input.reasoning_content {
61+
#[allow(unused_mut)]
62+
let mut object_19 = object.key("reasoningContent").start_object();
63+
crate::protocol_serde::shape_reasoning_content::ser_reasoning_content(&mut object_19, var_18)?;
64+
object_19.finish();
65+
}
6066
Ok(())
6167
}

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,25 @@ where
4545
.transpose()?,
4646
);
4747
},
48+
"currentUsageWithPrecision" => {
49+
builder = builder.set_current_usage_with_precision(
50+
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
51+
.map(|v| v.to_f64_lossy()),
52+
);
53+
},
4854
"usageLimit" => {
4955
builder = builder.set_usage_limit(
5056
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
5157
.map(i32::try_from)
5258
.transpose()?,
5359
);
5460
},
61+
"usageLimitWithPrecision" => {
62+
builder = builder.set_usage_limit_with_precision(
63+
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
64+
.map(|v| v.to_f64_lossy()),
65+
);
66+
},
5567
_ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
5668
}
5769
},

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ where
4141
.transpose()?,
4242
);
4343
},
44+
"rateMultiplier" => {
45+
builder = builder.set_rate_multiplier(
46+
::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
47+
.map(|v| v.to_f64_lossy()),
48+
);
49+
},
50+
"rateUnit" => {
51+
builder = builder.set_rate_unit(
52+
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
53+
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
54+
.transpose()?,
55+
);
56+
},
4457
"tokenLimits" => {
4558
builder = builder.set_token_limits(
4659
crate::protocol_serde::shape_token_limits::de_token_limits(tokens)?,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2+
pub fn ser_reasoning_content(
3+
object_19: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
4+
input: &crate::types::ReasoningContent,
5+
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
6+
match input {
7+
crate::types::ReasoningContent::ReasoningText(inner) => {
8+
#[allow(unused_mut)]
9+
let mut object_1 = object_19.key("reasoningText").start_object();
10+
crate::protocol_serde::shape_reasoning_text::ser_reasoning_text(&mut object_1, inner)?;
11+
object_1.finish();
12+
},
13+
crate::types::ReasoningContent::RedactedContent(inner) => {
14+
object_19
15+
.key("redactedContent")
16+
.string_unchecked(&::aws_smithy_types::base64::encode(inner));
17+
},
18+
crate::types::ReasoningContent::Unknown => {
19+
return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("ReasoningContent"));
20+
},
21+
}
22+
Ok(())
23+
}

0 commit comments

Comments
 (0)