aws_sdk_datapipeline/operation/evaluate_expression/
_evaluate_expression_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the parameters for EvaluateExpression.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EvaluateExpressionInput {
7    /// <p>The ID of the pipeline.</p>
8    pub pipeline_id: ::std::option::Option<::std::string::String>,
9    /// <p>The ID of the object.</p>
10    pub object_id: ::std::option::Option<::std::string::String>,
11    /// <p>The expression to evaluate.</p>
12    pub expression: ::std::option::Option<::std::string::String>,
13}
14impl EvaluateExpressionInput {
15    /// <p>The ID of the pipeline.</p>
16    pub fn pipeline_id(&self) -> ::std::option::Option<&str> {
17        self.pipeline_id.as_deref()
18    }
19    /// <p>The ID of the object.</p>
20    pub fn object_id(&self) -> ::std::option::Option<&str> {
21        self.object_id.as_deref()
22    }
23    /// <p>The expression to evaluate.</p>
24    pub fn expression(&self) -> ::std::option::Option<&str> {
25        self.expression.as_deref()
26    }
27}
28impl EvaluateExpressionInput {
29    /// Creates a new builder-style object to manufacture [`EvaluateExpressionInput`](crate::operation::evaluate_expression::EvaluateExpressionInput).
30    pub fn builder() -> crate::operation::evaluate_expression::builders::EvaluateExpressionInputBuilder {
31        crate::operation::evaluate_expression::builders::EvaluateExpressionInputBuilder::default()
32    }
33}
34
35/// A builder for [`EvaluateExpressionInput`](crate::operation::evaluate_expression::EvaluateExpressionInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct EvaluateExpressionInputBuilder {
39    pub(crate) pipeline_id: ::std::option::Option<::std::string::String>,
40    pub(crate) object_id: ::std::option::Option<::std::string::String>,
41    pub(crate) expression: ::std::option::Option<::std::string::String>,
42}
43impl EvaluateExpressionInputBuilder {
44    /// <p>The ID of the pipeline.</p>
45    /// This field is required.
46    pub fn pipeline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.pipeline_id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The ID of the pipeline.</p>
51    pub fn set_pipeline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.pipeline_id = input;
53        self
54    }
55    /// <p>The ID of the pipeline.</p>
56    pub fn get_pipeline_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.pipeline_id
58    }
59    /// <p>The ID of the object.</p>
60    /// This field is required.
61    pub fn object_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.object_id = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>The ID of the object.</p>
66    pub fn set_object_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.object_id = input;
68        self
69    }
70    /// <p>The ID of the object.</p>
71    pub fn get_object_id(&self) -> &::std::option::Option<::std::string::String> {
72        &self.object_id
73    }
74    /// <p>The expression to evaluate.</p>
75    /// This field is required.
76    pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77        self.expression = ::std::option::Option::Some(input.into());
78        self
79    }
80    /// <p>The expression to evaluate.</p>
81    pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82        self.expression = input;
83        self
84    }
85    /// <p>The expression to evaluate.</p>
86    pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
87        &self.expression
88    }
89    /// Consumes the builder and constructs a [`EvaluateExpressionInput`](crate::operation::evaluate_expression::EvaluateExpressionInput).
90    pub fn build(
91        self,
92    ) -> ::std::result::Result<crate::operation::evaluate_expression::EvaluateExpressionInput, ::aws_smithy_types::error::operation::BuildError> {
93        ::std::result::Result::Ok(crate::operation::evaluate_expression::EvaluateExpressionInput {
94            pipeline_id: self.pipeline_id,
95            object_id: self.object_id,
96            expression: self.expression,
97        })
98    }
99}