aws_sdk_bedrockagent/operation/create_agent/
_create_agent_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateAgentInput {
6    /// <p>A name for the agent that you create.</p>
7    pub agent_name: ::std::option::Option<::std::string::String>,
8    /// <p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
9    pub client_token: ::std::option::Option<::std::string::String>,
10    /// <p>Instructions that tell the agent what it should do and how it should interact with users.</p>
11    pub instruction: ::std::option::Option<::std::string::String>,
12    /// <p>The identifier for the model that you want to be used for orchestration by the agent you create.</p>
13    /// <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
14    /// <ul>
15    /// <li>
16    /// <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p></li>
17    /// <li>
18    /// <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p></li>
19    /// <li>
20    /// <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p></li>
21    /// <li>
22    /// <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p></li>
23    /// <li>
24    /// <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p></li>
25    /// </ul>
26    pub foundation_model: ::std::option::Option<::std::string::String>,
27    /// <p>A description of the agent.</p>
28    pub description: ::std::option::Option<::std::string::String>,
29    /// <p>Specifies the type of orchestration strategy for the agent. This is set to <code>DEFAULT</code> orchestration type, by default.</p>
30    pub orchestration_type: ::std::option::Option<crate::types::OrchestrationType>,
31    /// <p>Contains details of the custom orchestration configured for the agent.</p>
32    pub custom_orchestration: ::std::option::Option<crate::types::CustomOrchestration>,
33    /// <p>The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.</p>
34    /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.</p>
35    pub idle_session_ttl_in_seconds: ::std::option::Option<i32>,
36    /// <p>The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.</p>
37    pub agent_resource_role_arn: ::std::option::Option<::std::string::String>,
38    /// <p>The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.</p>
39    pub customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
40    /// <p>Any tags that you want to attach to the agent.</p>
41    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
42    /// <p>Contains configurations to override prompts in different parts of an agent sequence. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html">Advanced prompts</a>.</p>
43    pub prompt_override_configuration: ::std::option::Option<crate::types::PromptOverrideConfiguration>,
44    /// <p>The unique Guardrail configuration assigned to the agent when it is created.</p>
45    pub guardrail_configuration: ::std::option::Option<crate::types::GuardrailConfiguration>,
46    /// <p>Contains the details of the memory configured for the agent.</p>
47    pub memory_configuration: ::std::option::Option<crate::types::MemoryConfiguration>,
48    /// <p>The agent's collaboration role.</p>
49    pub agent_collaboration: ::std::option::Option<crate::types::AgentCollaboration>,
50}
51impl CreateAgentInput {
52    /// <p>A name for the agent that you create.</p>
53    pub fn agent_name(&self) -> ::std::option::Option<&str> {
54        self.agent_name.as_deref()
55    }
56    /// <p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
57    pub fn client_token(&self) -> ::std::option::Option<&str> {
58        self.client_token.as_deref()
59    }
60    /// <p>Instructions that tell the agent what it should do and how it should interact with users.</p>
61    pub fn instruction(&self) -> ::std::option::Option<&str> {
62        self.instruction.as_deref()
63    }
64    /// <p>The identifier for the model that you want to be used for orchestration by the agent you create.</p>
65    /// <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
66    /// <ul>
67    /// <li>
68    /// <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p></li>
69    /// <li>
70    /// <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p></li>
71    /// <li>
72    /// <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p></li>
73    /// <li>
74    /// <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p></li>
75    /// <li>
76    /// <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p></li>
77    /// </ul>
78    pub fn foundation_model(&self) -> ::std::option::Option<&str> {
79        self.foundation_model.as_deref()
80    }
81    /// <p>A description of the agent.</p>
82    pub fn description(&self) -> ::std::option::Option<&str> {
83        self.description.as_deref()
84    }
85    /// <p>Specifies the type of orchestration strategy for the agent. This is set to <code>DEFAULT</code> orchestration type, by default.</p>
86    pub fn orchestration_type(&self) -> ::std::option::Option<&crate::types::OrchestrationType> {
87        self.orchestration_type.as_ref()
88    }
89    /// <p>Contains details of the custom orchestration configured for the agent.</p>
90    pub fn custom_orchestration(&self) -> ::std::option::Option<&crate::types::CustomOrchestration> {
91        self.custom_orchestration.as_ref()
92    }
93    /// <p>The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.</p>
94    /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.</p>
95    pub fn idle_session_ttl_in_seconds(&self) -> ::std::option::Option<i32> {
96        self.idle_session_ttl_in_seconds
97    }
98    /// <p>The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.</p>
99    pub fn agent_resource_role_arn(&self) -> ::std::option::Option<&str> {
100        self.agent_resource_role_arn.as_deref()
101    }
102    /// <p>The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.</p>
103    pub fn customer_encryption_key_arn(&self) -> ::std::option::Option<&str> {
104        self.customer_encryption_key_arn.as_deref()
105    }
106    /// <p>Any tags that you want to attach to the agent.</p>
107    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
108        self.tags.as_ref()
109    }
110    /// <p>Contains configurations to override prompts in different parts of an agent sequence. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html">Advanced prompts</a>.</p>
111    pub fn prompt_override_configuration(&self) -> ::std::option::Option<&crate::types::PromptOverrideConfiguration> {
112        self.prompt_override_configuration.as_ref()
113    }
114    /// <p>The unique Guardrail configuration assigned to the agent when it is created.</p>
115    pub fn guardrail_configuration(&self) -> ::std::option::Option<&crate::types::GuardrailConfiguration> {
116        self.guardrail_configuration.as_ref()
117    }
118    /// <p>Contains the details of the memory configured for the agent.</p>
119    pub fn memory_configuration(&self) -> ::std::option::Option<&crate::types::MemoryConfiguration> {
120        self.memory_configuration.as_ref()
121    }
122    /// <p>The agent's collaboration role.</p>
123    pub fn agent_collaboration(&self) -> ::std::option::Option<&crate::types::AgentCollaboration> {
124        self.agent_collaboration.as_ref()
125    }
126}
127impl ::std::fmt::Debug for CreateAgentInput {
128    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
129        let mut formatter = f.debug_struct("CreateAgentInput");
130        formatter.field("agent_name", &self.agent_name);
131        formatter.field("client_token", &self.client_token);
132        formatter.field("instruction", &"*** Sensitive Data Redacted ***");
133        formatter.field("foundation_model", &self.foundation_model);
134        formatter.field("description", &self.description);
135        formatter.field("orchestration_type", &self.orchestration_type);
136        formatter.field("custom_orchestration", &self.custom_orchestration);
137        formatter.field("idle_session_ttl_in_seconds", &self.idle_session_ttl_in_seconds);
138        formatter.field("agent_resource_role_arn", &self.agent_resource_role_arn);
139        formatter.field("customer_encryption_key_arn", &self.customer_encryption_key_arn);
140        formatter.field("tags", &self.tags);
141        formatter.field("prompt_override_configuration", &"*** Sensitive Data Redacted ***");
142        formatter.field("guardrail_configuration", &self.guardrail_configuration);
143        formatter.field("memory_configuration", &self.memory_configuration);
144        formatter.field("agent_collaboration", &self.agent_collaboration);
145        formatter.finish()
146    }
147}
148impl CreateAgentInput {
149    /// Creates a new builder-style object to manufacture [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
150    pub fn builder() -> crate::operation::create_agent::builders::CreateAgentInputBuilder {
151        crate::operation::create_agent::builders::CreateAgentInputBuilder::default()
152    }
153}
154
155/// A builder for [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
156#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
157#[non_exhaustive]
158pub struct CreateAgentInputBuilder {
159    pub(crate) agent_name: ::std::option::Option<::std::string::String>,
160    pub(crate) client_token: ::std::option::Option<::std::string::String>,
161    pub(crate) instruction: ::std::option::Option<::std::string::String>,
162    pub(crate) foundation_model: ::std::option::Option<::std::string::String>,
163    pub(crate) description: ::std::option::Option<::std::string::String>,
164    pub(crate) orchestration_type: ::std::option::Option<crate::types::OrchestrationType>,
165    pub(crate) custom_orchestration: ::std::option::Option<crate::types::CustomOrchestration>,
166    pub(crate) idle_session_ttl_in_seconds: ::std::option::Option<i32>,
167    pub(crate) agent_resource_role_arn: ::std::option::Option<::std::string::String>,
168    pub(crate) customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
169    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
170    pub(crate) prompt_override_configuration: ::std::option::Option<crate::types::PromptOverrideConfiguration>,
171    pub(crate) guardrail_configuration: ::std::option::Option<crate::types::GuardrailConfiguration>,
172    pub(crate) memory_configuration: ::std::option::Option<crate::types::MemoryConfiguration>,
173    pub(crate) agent_collaboration: ::std::option::Option<crate::types::AgentCollaboration>,
174}
175impl CreateAgentInputBuilder {
176    /// <p>A name for the agent that you create.</p>
177    /// This field is required.
178    pub fn agent_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.agent_name = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>A name for the agent that you create.</p>
183    pub fn set_agent_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.agent_name = input;
185        self
186    }
187    /// <p>A name for the agent that you create.</p>
188    pub fn get_agent_name(&self) -> &::std::option::Option<::std::string::String> {
189        &self.agent_name
190    }
191    /// <p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
192    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.client_token = ::std::option::Option::Some(input.into());
194        self
195    }
196    /// <p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
197    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198        self.client_token = input;
199        self
200    }
201    /// <p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
202    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
203        &self.client_token
204    }
205    /// <p>Instructions that tell the agent what it should do and how it should interact with users.</p>
206    pub fn instruction(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207        self.instruction = ::std::option::Option::Some(input.into());
208        self
209    }
210    /// <p>Instructions that tell the agent what it should do and how it should interact with users.</p>
211    pub fn set_instruction(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212        self.instruction = input;
213        self
214    }
215    /// <p>Instructions that tell the agent what it should do and how it should interact with users.</p>
216    pub fn get_instruction(&self) -> &::std::option::Option<::std::string::String> {
217        &self.instruction
218    }
219    /// <p>The identifier for the model that you want to be used for orchestration by the agent you create.</p>
220    /// <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
221    /// <ul>
222    /// <li>
223    /// <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p></li>
224    /// <li>
225    /// <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p></li>
226    /// <li>
227    /// <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p></li>
228    /// <li>
229    /// <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p></li>
230    /// <li>
231    /// <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p></li>
232    /// </ul>
233    pub fn foundation_model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234        self.foundation_model = ::std::option::Option::Some(input.into());
235        self
236    }
237    /// <p>The identifier for the model that you want to be used for orchestration by the agent you create.</p>
238    /// <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
239    /// <ul>
240    /// <li>
241    /// <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p></li>
242    /// <li>
243    /// <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p></li>
244    /// <li>
245    /// <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p></li>
246    /// <li>
247    /// <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p></li>
248    /// <li>
249    /// <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p></li>
250    /// </ul>
251    pub fn set_foundation_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252        self.foundation_model = input;
253        self
254    }
255    /// <p>The identifier for the model that you want to be used for orchestration by the agent you create.</p>
256    /// <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
257    /// <ul>
258    /// <li>
259    /// <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p></li>
260    /// <li>
261    /// <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p></li>
262    /// <li>
263    /// <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p></li>
264    /// <li>
265    /// <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p></li>
266    /// <li>
267    /// <p>If you use an <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported model</a>, specify the ARN of the imported model. You can get the model ARN from a successful call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html">CreateModelImportJob</a> or from the Imported models page in the Amazon Bedrock console.</p></li>
268    /// </ul>
269    pub fn get_foundation_model(&self) -> &::std::option::Option<::std::string::String> {
270        &self.foundation_model
271    }
272    /// <p>A description of the agent.</p>
273    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
274        self.description = ::std::option::Option::Some(input.into());
275        self
276    }
277    /// <p>A description of the agent.</p>
278    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
279        self.description = input;
280        self
281    }
282    /// <p>A description of the agent.</p>
283    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
284        &self.description
285    }
286    /// <p>Specifies the type of orchestration strategy for the agent. This is set to <code>DEFAULT</code> orchestration type, by default.</p>
287    pub fn orchestration_type(mut self, input: crate::types::OrchestrationType) -> Self {
288        self.orchestration_type = ::std::option::Option::Some(input);
289        self
290    }
291    /// <p>Specifies the type of orchestration strategy for the agent. This is set to <code>DEFAULT</code> orchestration type, by default.</p>
292    pub fn set_orchestration_type(mut self, input: ::std::option::Option<crate::types::OrchestrationType>) -> Self {
293        self.orchestration_type = input;
294        self
295    }
296    /// <p>Specifies the type of orchestration strategy for the agent. This is set to <code>DEFAULT</code> orchestration type, by default.</p>
297    pub fn get_orchestration_type(&self) -> &::std::option::Option<crate::types::OrchestrationType> {
298        &self.orchestration_type
299    }
300    /// <p>Contains details of the custom orchestration configured for the agent.</p>
301    pub fn custom_orchestration(mut self, input: crate::types::CustomOrchestration) -> Self {
302        self.custom_orchestration = ::std::option::Option::Some(input);
303        self
304    }
305    /// <p>Contains details of the custom orchestration configured for the agent.</p>
306    pub fn set_custom_orchestration(mut self, input: ::std::option::Option<crate::types::CustomOrchestration>) -> Self {
307        self.custom_orchestration = input;
308        self
309    }
310    /// <p>Contains details of the custom orchestration configured for the agent.</p>
311    pub fn get_custom_orchestration(&self) -> &::std::option::Option<crate::types::CustomOrchestration> {
312        &self.custom_orchestration
313    }
314    /// <p>The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.</p>
315    /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.</p>
316    pub fn idle_session_ttl_in_seconds(mut self, input: i32) -> Self {
317        self.idle_session_ttl_in_seconds = ::std::option::Option::Some(input);
318        self
319    }
320    /// <p>The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.</p>
321    /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.</p>
322    pub fn set_idle_session_ttl_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
323        self.idle_session_ttl_in_seconds = input;
324        self
325    }
326    /// <p>The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.</p>
327    /// <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.</p>
328    pub fn get_idle_session_ttl_in_seconds(&self) -> &::std::option::Option<i32> {
329        &self.idle_session_ttl_in_seconds
330    }
331    /// <p>The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.</p>
332    pub fn agent_resource_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
333        self.agent_resource_role_arn = ::std::option::Option::Some(input.into());
334        self
335    }
336    /// <p>The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.</p>
337    pub fn set_agent_resource_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
338        self.agent_resource_role_arn = input;
339        self
340    }
341    /// <p>The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.</p>
342    pub fn get_agent_resource_role_arn(&self) -> &::std::option::Option<::std::string::String> {
343        &self.agent_resource_role_arn
344    }
345    /// <p>The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.</p>
346    pub fn customer_encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
347        self.customer_encryption_key_arn = ::std::option::Option::Some(input.into());
348        self
349    }
350    /// <p>The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.</p>
351    pub fn set_customer_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
352        self.customer_encryption_key_arn = input;
353        self
354    }
355    /// <p>The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.</p>
356    pub fn get_customer_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
357        &self.customer_encryption_key_arn
358    }
359    /// Adds a key-value pair to `tags`.
360    ///
361    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
362    ///
363    /// <p>Any tags that you want to attach to the agent.</p>
364    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
365        let mut hash_map = self.tags.unwrap_or_default();
366        hash_map.insert(k.into(), v.into());
367        self.tags = ::std::option::Option::Some(hash_map);
368        self
369    }
370    /// <p>Any tags that you want to attach to the agent.</p>
371    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
372        self.tags = input;
373        self
374    }
375    /// <p>Any tags that you want to attach to the agent.</p>
376    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
377        &self.tags
378    }
379    /// <p>Contains configurations to override prompts in different parts of an agent sequence. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html">Advanced prompts</a>.</p>
380    pub fn prompt_override_configuration(mut self, input: crate::types::PromptOverrideConfiguration) -> Self {
381        self.prompt_override_configuration = ::std::option::Option::Some(input);
382        self
383    }
384    /// <p>Contains configurations to override prompts in different parts of an agent sequence. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html">Advanced prompts</a>.</p>
385    pub fn set_prompt_override_configuration(mut self, input: ::std::option::Option<crate::types::PromptOverrideConfiguration>) -> Self {
386        self.prompt_override_configuration = input;
387        self
388    }
389    /// <p>Contains configurations to override prompts in different parts of an agent sequence. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html">Advanced prompts</a>.</p>
390    pub fn get_prompt_override_configuration(&self) -> &::std::option::Option<crate::types::PromptOverrideConfiguration> {
391        &self.prompt_override_configuration
392    }
393    /// <p>The unique Guardrail configuration assigned to the agent when it is created.</p>
394    pub fn guardrail_configuration(mut self, input: crate::types::GuardrailConfiguration) -> Self {
395        self.guardrail_configuration = ::std::option::Option::Some(input);
396        self
397    }
398    /// <p>The unique Guardrail configuration assigned to the agent when it is created.</p>
399    pub fn set_guardrail_configuration(mut self, input: ::std::option::Option<crate::types::GuardrailConfiguration>) -> Self {
400        self.guardrail_configuration = input;
401        self
402    }
403    /// <p>The unique Guardrail configuration assigned to the agent when it is created.</p>
404    pub fn get_guardrail_configuration(&self) -> &::std::option::Option<crate::types::GuardrailConfiguration> {
405        &self.guardrail_configuration
406    }
407    /// <p>Contains the details of the memory configured for the agent.</p>
408    pub fn memory_configuration(mut self, input: crate::types::MemoryConfiguration) -> Self {
409        self.memory_configuration = ::std::option::Option::Some(input);
410        self
411    }
412    /// <p>Contains the details of the memory configured for the agent.</p>
413    pub fn set_memory_configuration(mut self, input: ::std::option::Option<crate::types::MemoryConfiguration>) -> Self {
414        self.memory_configuration = input;
415        self
416    }
417    /// <p>Contains the details of the memory configured for the agent.</p>
418    pub fn get_memory_configuration(&self) -> &::std::option::Option<crate::types::MemoryConfiguration> {
419        &self.memory_configuration
420    }
421    /// <p>The agent's collaboration role.</p>
422    pub fn agent_collaboration(mut self, input: crate::types::AgentCollaboration) -> Self {
423        self.agent_collaboration = ::std::option::Option::Some(input);
424        self
425    }
426    /// <p>The agent's collaboration role.</p>
427    pub fn set_agent_collaboration(mut self, input: ::std::option::Option<crate::types::AgentCollaboration>) -> Self {
428        self.agent_collaboration = input;
429        self
430    }
431    /// <p>The agent's collaboration role.</p>
432    pub fn get_agent_collaboration(&self) -> &::std::option::Option<crate::types::AgentCollaboration> {
433        &self.agent_collaboration
434    }
435    /// Consumes the builder and constructs a [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
436    pub fn build(self) -> ::std::result::Result<crate::operation::create_agent::CreateAgentInput, ::aws_smithy_types::error::operation::BuildError> {
437        ::std::result::Result::Ok(crate::operation::create_agent::CreateAgentInput {
438            agent_name: self.agent_name,
439            client_token: self.client_token,
440            instruction: self.instruction,
441            foundation_model: self.foundation_model,
442            description: self.description,
443            orchestration_type: self.orchestration_type,
444            custom_orchestration: self.custom_orchestration,
445            idle_session_ttl_in_seconds: self.idle_session_ttl_in_seconds,
446            agent_resource_role_arn: self.agent_resource_role_arn,
447            customer_encryption_key_arn: self.customer_encryption_key_arn,
448            tags: self.tags,
449            prompt_override_configuration: self.prompt_override_configuration,
450            guardrail_configuration: self.guardrail_configuration,
451            memory_configuration: self.memory_configuration,
452            agent_collaboration: self.agent_collaboration,
453        })
454    }
455}
456impl ::std::fmt::Debug for CreateAgentInputBuilder {
457    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
458        let mut formatter = f.debug_struct("CreateAgentInputBuilder");
459        formatter.field("agent_name", &self.agent_name);
460        formatter.field("client_token", &self.client_token);
461        formatter.field("instruction", &"*** Sensitive Data Redacted ***");
462        formatter.field("foundation_model", &self.foundation_model);
463        formatter.field("description", &self.description);
464        formatter.field("orchestration_type", &self.orchestration_type);
465        formatter.field("custom_orchestration", &self.custom_orchestration);
466        formatter.field("idle_session_ttl_in_seconds", &self.idle_session_ttl_in_seconds);
467        formatter.field("agent_resource_role_arn", &self.agent_resource_role_arn);
468        formatter.field("customer_encryption_key_arn", &self.customer_encryption_key_arn);
469        formatter.field("tags", &self.tags);
470        formatter.field("prompt_override_configuration", &"*** Sensitive Data Redacted ***");
471        formatter.field("guardrail_configuration", &self.guardrail_configuration);
472        formatter.field("memory_configuration", &self.memory_configuration);
473        formatter.field("agent_collaboration", &self.agent_collaboration);
474        formatter.finish()
475    }
476}