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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
// 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)]
pub struct InvokeInferenceRouterInput {
/// <p>The name of the inference router to invoke.</p>
pub inference_router_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the routing target in the inference router. The routing target lists the destinations that can serve the request.</p>
pub routing_target_name: ::std::option::Option<::std::string::String>,
/// <p>The MIME type of the input data in the request body. The router passes it to the destination.</p>
pub content_type: ::std::option::Option<::std::string::String>,
/// <p>The MIME type that you want for the inference response. The router passes it to the destination.</p>
pub accept: ::std::option::Option<::std::string::String>,
/// <p>An identifier for the inference request. The router passes it to the destination.</p>
pub inference_id: ::std::option::Option<::std::string::String>,
/// <p>An optional, stable identifier that serves as a routing hint for prefix-aware routing. The router passes it to the destination that serves the request. Within that destination, requests with the same prefix and the same identifier go to the same instance. If requests from different applications might have the same prompt prefix, set a different identifier for each application to differentiate their routing decisions.</p>
/// <p>Applies only to destination endpoints configured with a <code>RoutingStrategy</code> of <code>PREFIX_AWARE</code>.</p>
pub prefix_aware_id: ::std::option::Option<::std::string::String>,
/// <p>Provides additional information about the inference request. The value is an opaque string that the router passes, unchanged, to the model container of the destination that serves the request. The value can contain up to 1,024 visible US-ASCII characters.</p>
pub custom_attributes: ::std::option::Option<::std::string::String>,
/// <p>The input data for the inference, in the format that your model expects. The body can't be empty.</p>
pub body: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl InvokeInferenceRouterInput {
/// <p>The name of the inference router to invoke.</p>
pub fn inference_router_name(&self) -> ::std::option::Option<&str> {
self.inference_router_name.as_deref()
}
/// <p>The name of the routing target in the inference router. The routing target lists the destinations that can serve the request.</p>
pub fn routing_target_name(&self) -> ::std::option::Option<&str> {
self.routing_target_name.as_deref()
}
/// <p>The MIME type of the input data in the request body. The router passes it to the destination.</p>
pub fn content_type(&self) -> ::std::option::Option<&str> {
self.content_type.as_deref()
}
/// <p>The MIME type that you want for the inference response. The router passes it to the destination.</p>
pub fn accept(&self) -> ::std::option::Option<&str> {
self.accept.as_deref()
}
/// <p>An identifier for the inference request. The router passes it to the destination.</p>
pub fn inference_id(&self) -> ::std::option::Option<&str> {
self.inference_id.as_deref()
}
/// <p>An optional, stable identifier that serves as a routing hint for prefix-aware routing. The router passes it to the destination that serves the request. Within that destination, requests with the same prefix and the same identifier go to the same instance. If requests from different applications might have the same prompt prefix, set a different identifier for each application to differentiate their routing decisions.</p>
/// <p>Applies only to destination endpoints configured with a <code>RoutingStrategy</code> of <code>PREFIX_AWARE</code>.</p>
pub fn prefix_aware_id(&self) -> ::std::option::Option<&str> {
self.prefix_aware_id.as_deref()
}
/// <p>Provides additional information about the inference request. The value is an opaque string that the router passes, unchanged, to the model container of the destination that serves the request. The value can contain up to 1,024 visible US-ASCII characters.</p>
pub fn custom_attributes(&self) -> ::std::option::Option<&str> {
self.custom_attributes.as_deref()
}
/// <p>The input data for the inference, in the format that your model expects. The body can't be empty.</p>
pub fn body(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
self.body.as_ref()
}
}
impl ::std::fmt::Debug for InvokeInferenceRouterInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("InvokeInferenceRouterInput");
formatter.field("inference_router_name", &self.inference_router_name);
formatter.field("routing_target_name", &self.routing_target_name);
formatter.field("content_type", &self.content_type);
formatter.field("accept", &self.accept);
formatter.field("inference_id", &self.inference_id);
formatter.field("prefix_aware_id", &self.prefix_aware_id);
formatter.field("custom_attributes", &"*** Sensitive Data Redacted ***");
formatter.field("body", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl InvokeInferenceRouterInput {
/// Creates a new builder-style object to manufacture [`InvokeInferenceRouterInput`](crate::operation::invoke_inference_router::InvokeInferenceRouterInput).
pub fn builder() -> crate::operation::invoke_inference_router::builders::InvokeInferenceRouterInputBuilder {
crate::operation::invoke_inference_router::builders::InvokeInferenceRouterInputBuilder::default()
}
}
/// A builder for [`InvokeInferenceRouterInput`](crate::operation::invoke_inference_router::InvokeInferenceRouterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct InvokeInferenceRouterInputBuilder {
pub(crate) inference_router_name: ::std::option::Option<::std::string::String>,
pub(crate) routing_target_name: ::std::option::Option<::std::string::String>,
pub(crate) content_type: ::std::option::Option<::std::string::String>,
pub(crate) accept: ::std::option::Option<::std::string::String>,
pub(crate) inference_id: ::std::option::Option<::std::string::String>,
pub(crate) prefix_aware_id: ::std::option::Option<::std::string::String>,
pub(crate) custom_attributes: ::std::option::Option<::std::string::String>,
pub(crate) body: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl InvokeInferenceRouterInputBuilder {
/// <p>The name of the inference router to invoke.</p>
/// This field is required.
pub fn inference_router_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inference_router_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the inference router to invoke.</p>
pub fn set_inference_router_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inference_router_name = input;
self
}
/// <p>The name of the inference router to invoke.</p>
pub fn get_inference_router_name(&self) -> &::std::option::Option<::std::string::String> {
&self.inference_router_name
}
/// <p>The name of the routing target in the inference router. The routing target lists the destinations that can serve the request.</p>
/// This field is required.
pub fn routing_target_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.routing_target_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the routing target in the inference router. The routing target lists the destinations that can serve the request.</p>
pub fn set_routing_target_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.routing_target_name = input;
self
}
/// <p>The name of the routing target in the inference router. The routing target lists the destinations that can serve the request.</p>
pub fn get_routing_target_name(&self) -> &::std::option::Option<::std::string::String> {
&self.routing_target_name
}
/// <p>The MIME type of the input data in the request body. The router passes it to the destination.</p>
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 MIME type of the input data in the request body. The router passes it to the destination.</p>
pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content_type = input;
self
}
/// <p>The MIME type of the input data in the request body. The router passes it to the destination.</p>
pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
&self.content_type
}
/// <p>The MIME type that you want for the inference response. The router passes it to the destination.</p>
pub fn accept(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.accept = ::std::option::Option::Some(input.into());
self
}
/// <p>The MIME type that you want for the inference response. The router passes it to the destination.</p>
pub fn set_accept(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.accept = input;
self
}
/// <p>The MIME type that you want for the inference response. The router passes it to the destination.</p>
pub fn get_accept(&self) -> &::std::option::Option<::std::string::String> {
&self.accept
}
/// <p>An identifier for the inference request. The router passes it to the destination.</p>
pub fn inference_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inference_id = ::std::option::Option::Some(input.into());
self
}
/// <p>An identifier for the inference request. The router passes it to the destination.</p>
pub fn set_inference_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inference_id = input;
self
}
/// <p>An identifier for the inference request. The router passes it to the destination.</p>
pub fn get_inference_id(&self) -> &::std::option::Option<::std::string::String> {
&self.inference_id
}
/// <p>An optional, stable identifier that serves as a routing hint for prefix-aware routing. The router passes it to the destination that serves the request. Within that destination, requests with the same prefix and the same identifier go to the same instance. If requests from different applications might have the same prompt prefix, set a different identifier for each application to differentiate their routing decisions.</p>
/// <p>Applies only to destination endpoints configured with a <code>RoutingStrategy</code> of <code>PREFIX_AWARE</code>.</p>
pub fn prefix_aware_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.prefix_aware_id = ::std::option::Option::Some(input.into());
self
}
/// <p>An optional, stable identifier that serves as a routing hint for prefix-aware routing. The router passes it to the destination that serves the request. Within that destination, requests with the same prefix and the same identifier go to the same instance. If requests from different applications might have the same prompt prefix, set a different identifier for each application to differentiate their routing decisions.</p>
/// <p>Applies only to destination endpoints configured with a <code>RoutingStrategy</code> of <code>PREFIX_AWARE</code>.</p>
pub fn set_prefix_aware_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.prefix_aware_id = input;
self
}
/// <p>An optional, stable identifier that serves as a routing hint for prefix-aware routing. The router passes it to the destination that serves the request. Within that destination, requests with the same prefix and the same identifier go to the same instance. If requests from different applications might have the same prompt prefix, set a different identifier for each application to differentiate their routing decisions.</p>
/// <p>Applies only to destination endpoints configured with a <code>RoutingStrategy</code> of <code>PREFIX_AWARE</code>.</p>
pub fn get_prefix_aware_id(&self) -> &::std::option::Option<::std::string::String> {
&self.prefix_aware_id
}
/// <p>Provides additional information about the inference request. The value is an opaque string that the router passes, unchanged, to the model container of the destination that serves the request. The value can contain up to 1,024 visible US-ASCII characters.</p>
pub fn custom_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.custom_attributes = ::std::option::Option::Some(input.into());
self
}
/// <p>Provides additional information about the inference request. The value is an opaque string that the router passes, unchanged, to the model container of the destination that serves the request. The value can contain up to 1,024 visible US-ASCII characters.</p>
pub fn set_custom_attributes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.custom_attributes = input;
self
}
/// <p>Provides additional information about the inference request. The value is an opaque string that the router passes, unchanged, to the model container of the destination that serves the request. The value can contain up to 1,024 visible US-ASCII characters.</p>
pub fn get_custom_attributes(&self) -> &::std::option::Option<::std::string::String> {
&self.custom_attributes
}
/// <p>The input data for the inference, in the format that your model expects. The body can't be empty.</p>
/// This field is required.
pub fn body(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.body = ::std::option::Option::Some(input);
self
}
/// <p>The input data for the inference, in the format that your model expects. The body can't be empty.</p>
pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.body = input;
self
}
/// <p>The input data for the inference, in the format that your model expects. The body can't be empty.</p>
pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.body
}
/// Consumes the builder and constructs a [`InvokeInferenceRouterInput`](crate::operation::invoke_inference_router::InvokeInferenceRouterInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::invoke_inference_router::InvokeInferenceRouterInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::invoke_inference_router::InvokeInferenceRouterInput {
inference_router_name: self.inference_router_name,
routing_target_name: self.routing_target_name,
content_type: self.content_type,
accept: self.accept,
inference_id: self.inference_id,
prefix_aware_id: self.prefix_aware_id,
custom_attributes: self.custom_attributes,
body: self.body,
})
}
}
impl ::std::fmt::Debug for InvokeInferenceRouterInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("InvokeInferenceRouterInputBuilder");
formatter.field("inference_router_name", &self.inference_router_name);
formatter.field("routing_target_name", &self.routing_target_name);
formatter.field("content_type", &self.content_type);
formatter.field("accept", &self.accept);
formatter.field("inference_id", &self.inference_id);
formatter.field("prefix_aware_id", &self.prefix_aware_id);
formatter.field("custom_attributes", &"*** Sensitive Data Redacted ***");
formatter.field("body", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}