aws_sdk_databrew/operation/describe_recipe/
_describe_recipe_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 DescribeRecipeInput {
6    /// <p>The name of the recipe to be described.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The recipe version identifier. If this parameter isn't specified, then the latest published version is returned.</p>
9    pub recipe_version: ::std::option::Option<::std::string::String>,
10}
11impl DescribeRecipeInput {
12    /// <p>The name of the recipe to be described.</p>
13    pub fn name(&self) -> ::std::option::Option<&str> {
14        self.name.as_deref()
15    }
16    /// <p>The recipe version identifier. If this parameter isn't specified, then the latest published version is returned.</p>
17    pub fn recipe_version(&self) -> ::std::option::Option<&str> {
18        self.recipe_version.as_deref()
19    }
20}
21impl DescribeRecipeInput {
22    /// Creates a new builder-style object to manufacture [`DescribeRecipeInput`](crate::operation::describe_recipe::DescribeRecipeInput).
23    pub fn builder() -> crate::operation::describe_recipe::builders::DescribeRecipeInputBuilder {
24        crate::operation::describe_recipe::builders::DescribeRecipeInputBuilder::default()
25    }
26}
27
28/// A builder for [`DescribeRecipeInput`](crate::operation::describe_recipe::DescribeRecipeInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DescribeRecipeInputBuilder {
32    pub(crate) name: ::std::option::Option<::std::string::String>,
33    pub(crate) recipe_version: ::std::option::Option<::std::string::String>,
34}
35impl DescribeRecipeInputBuilder {
36    /// <p>The name of the recipe to be described.</p>
37    /// This field is required.
38    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the recipe to be described.</p>
43    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.name = input;
45        self
46    }
47    /// <p>The name of the recipe to be described.</p>
48    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.name
50    }
51    /// <p>The recipe version identifier. If this parameter isn't specified, then the latest published version is returned.</p>
52    pub fn recipe_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.recipe_version = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The recipe version identifier. If this parameter isn't specified, then the latest published version is returned.</p>
57    pub fn set_recipe_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.recipe_version = input;
59        self
60    }
61    /// <p>The recipe version identifier. If this parameter isn't specified, then the latest published version is returned.</p>
62    pub fn get_recipe_version(&self) -> &::std::option::Option<::std::string::String> {
63        &self.recipe_version
64    }
65    /// Consumes the builder and constructs a [`DescribeRecipeInput`](crate::operation::describe_recipe::DescribeRecipeInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::describe_recipe::DescribeRecipeInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::describe_recipe::DescribeRecipeInput {
70            name: self.name,
71            recipe_version: self.recipe_version,
72        })
73    }
74}