aws_sdk_bedrockagent/operation/get_prompt/
_get_prompt_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 GetPromptInput {
6    /// <p>The unique identifier of the prompt.</p>
7    pub prompt_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt.</p>
9    pub prompt_version: ::std::option::Option<::std::string::String>,
10}
11impl GetPromptInput {
12    /// <p>The unique identifier of the prompt.</p>
13    pub fn prompt_identifier(&self) -> ::std::option::Option<&str> {
14        self.prompt_identifier.as_deref()
15    }
16    /// <p>The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt.</p>
17    pub fn prompt_version(&self) -> ::std::option::Option<&str> {
18        self.prompt_version.as_deref()
19    }
20}
21impl GetPromptInput {
22    /// Creates a new builder-style object to manufacture [`GetPromptInput`](crate::operation::get_prompt::GetPromptInput).
23    pub fn builder() -> crate::operation::get_prompt::builders::GetPromptInputBuilder {
24        crate::operation::get_prompt::builders::GetPromptInputBuilder::default()
25    }
26}
27
28/// A builder for [`GetPromptInput`](crate::operation::get_prompt::GetPromptInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct GetPromptInputBuilder {
32    pub(crate) prompt_identifier: ::std::option::Option<::std::string::String>,
33    pub(crate) prompt_version: ::std::option::Option<::std::string::String>,
34}
35impl GetPromptInputBuilder {
36    /// <p>The unique identifier of the prompt.</p>
37    /// This field is required.
38    pub fn prompt_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.prompt_identifier = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The unique identifier of the prompt.</p>
43    pub fn set_prompt_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.prompt_identifier = input;
45        self
46    }
47    /// <p>The unique identifier of the prompt.</p>
48    pub fn get_prompt_identifier(&self) -> &::std::option::Option<::std::string::String> {
49        &self.prompt_identifier
50    }
51    /// <p>The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt.</p>
52    pub fn prompt_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.prompt_version = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt.</p>
57    pub fn set_prompt_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.prompt_version = input;
59        self
60    }
61    /// <p>The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt.</p>
62    pub fn get_prompt_version(&self) -> &::std::option::Option<::std::string::String> {
63        &self.prompt_version
64    }
65    /// Consumes the builder and constructs a [`GetPromptInput`](crate::operation::get_prompt::GetPromptInput).
66    pub fn build(self) -> ::std::result::Result<crate::operation::get_prompt::GetPromptInput, ::aws_smithy_types::error::operation::BuildError> {
67        ::std::result::Result::Ok(crate::operation::get_prompt::GetPromptInput {
68            prompt_identifier: self.prompt_identifier,
69            prompt_version: self.prompt_version,
70        })
71    }
72}