aws_sdk_glue/types/
_recipe_reference.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RecipeReference {
7 pub recipe_arn: ::std::string::String,
9 pub recipe_version: ::std::string::String,
11}
12impl RecipeReference {
13 pub fn recipe_arn(&self) -> &str {
15 use std::ops::Deref;
16 self.recipe_arn.deref()
17 }
18 pub fn recipe_version(&self) -> &str {
20 use std::ops::Deref;
21 self.recipe_version.deref()
22 }
23}
24impl RecipeReference {
25 pub fn builder() -> crate::types::builders::RecipeReferenceBuilder {
27 crate::types::builders::RecipeReferenceBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct RecipeReferenceBuilder {
35 pub(crate) recipe_arn: ::std::option::Option<::std::string::String>,
36 pub(crate) recipe_version: ::std::option::Option<::std::string::String>,
37}
38impl RecipeReferenceBuilder {
39 pub fn recipe_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42 self.recipe_arn = ::std::option::Option::Some(input.into());
43 self
44 }
45 pub fn set_recipe_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47 self.recipe_arn = input;
48 self
49 }
50 pub fn get_recipe_arn(&self) -> &::std::option::Option<::std::string::String> {
52 &self.recipe_arn
53 }
54 pub fn recipe_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.recipe_version = ::std::option::Option::Some(input.into());
58 self
59 }
60 pub fn set_recipe_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.recipe_version = input;
63 self
64 }
65 pub fn get_recipe_version(&self) -> &::std::option::Option<::std::string::String> {
67 &self.recipe_version
68 }
69 pub fn build(self) -> ::std::result::Result<crate::types::RecipeReference, ::aws_smithy_types::error::operation::BuildError> {
74 ::std::result::Result::Ok(crate::types::RecipeReference {
75 recipe_arn: self.recipe_arn.ok_or_else(|| {
76 ::aws_smithy_types::error::operation::BuildError::missing_field(
77 "recipe_arn",
78 "recipe_arn was not specified but it is required when building RecipeReference",
79 )
80 })?,
81 recipe_version: self.recipe_version.ok_or_else(|| {
82 ::aws_smithy_types::error::operation::BuildError::missing_field(
83 "recipe_version",
84 "recipe_version was not specified but it is required when building RecipeReference",
85 )
86 })?,
87 })
88 }
89}