aws_sdk_bedrockagentruntime/operation/create_invocation/
_create_invocation_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, ::std::fmt::Debug)]
5pub struct CreateInvocationInput {
6    /// <p>A unique identifier for the invocation in UUID format.</p>
7    pub invocation_id: ::std::option::Option<::std::string::String>,
8    /// <p>A description for the interactions in the invocation. For example, "User asking about weather in Seattle".</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The unique identifier for the associated session for the invocation. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
11    pub session_identifier: ::std::option::Option<::std::string::String>,
12}
13impl CreateInvocationInput {
14    /// <p>A unique identifier for the invocation in UUID format.</p>
15    pub fn invocation_id(&self) -> ::std::option::Option<&str> {
16        self.invocation_id.as_deref()
17    }
18    /// <p>A description for the interactions in the invocation. For example, "User asking about weather in Seattle".</p>
19    pub fn description(&self) -> ::std::option::Option<&str> {
20        self.description.as_deref()
21    }
22    /// <p>The unique identifier for the associated session for the invocation. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
23    pub fn session_identifier(&self) -> ::std::option::Option<&str> {
24        self.session_identifier.as_deref()
25    }
26}
27impl CreateInvocationInput {
28    /// Creates a new builder-style object to manufacture [`CreateInvocationInput`](crate::operation::create_invocation::CreateInvocationInput).
29    pub fn builder() -> crate::operation::create_invocation::builders::CreateInvocationInputBuilder {
30        crate::operation::create_invocation::builders::CreateInvocationInputBuilder::default()
31    }
32}
33
34/// A builder for [`CreateInvocationInput`](crate::operation::create_invocation::CreateInvocationInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct CreateInvocationInputBuilder {
38    pub(crate) invocation_id: ::std::option::Option<::std::string::String>,
39    pub(crate) description: ::std::option::Option<::std::string::String>,
40    pub(crate) session_identifier: ::std::option::Option<::std::string::String>,
41}
42impl CreateInvocationInputBuilder {
43    /// <p>A unique identifier for the invocation in UUID format.</p>
44    pub fn invocation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.invocation_id = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>A unique identifier for the invocation in UUID format.</p>
49    pub fn set_invocation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.invocation_id = input;
51        self
52    }
53    /// <p>A unique identifier for the invocation in UUID format.</p>
54    pub fn get_invocation_id(&self) -> &::std::option::Option<::std::string::String> {
55        &self.invocation_id
56    }
57    /// <p>A description for the interactions in the invocation. For example, "User asking about weather in Seattle".</p>
58    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.description = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>A description for the interactions in the invocation. For example, "User asking about weather in Seattle".</p>
63    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.description = input;
65        self
66    }
67    /// <p>A description for the interactions in the invocation. For example, "User asking about weather in Seattle".</p>
68    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
69        &self.description
70    }
71    /// <p>The unique identifier for the associated session for the invocation. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
72    /// This field is required.
73    pub fn session_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.session_identifier = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The unique identifier for the associated session for the invocation. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
78    pub fn set_session_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.session_identifier = input;
80        self
81    }
82    /// <p>The unique identifier for the associated session for the invocation. You can specify either the session's <code>sessionId</code> or its Amazon Resource Name (ARN).</p>
83    pub fn get_session_identifier(&self) -> &::std::option::Option<::std::string::String> {
84        &self.session_identifier
85    }
86    /// Consumes the builder and constructs a [`CreateInvocationInput`](crate::operation::create_invocation::CreateInvocationInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::create_invocation::CreateInvocationInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::create_invocation::CreateInvocationInput {
91            invocation_id: self.invocation_id,
92            description: self.description,
93            session_identifier: self.session_identifier,
94        })
95    }
96}