aws_sdk_datapipeline/operation/create_pipeline/
_create_pipeline_output.rs#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreatePipelineOutput {
pub pipeline_id: ::std::string::String,
_request_id: Option<String>,
}
impl CreatePipelineOutput {
pub fn pipeline_id(&self) -> &str {
use std::ops::Deref;
self.pipeline_id.deref()
}
}
impl ::aws_types::request_id::RequestId for CreatePipelineOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreatePipelineOutput {
pub fn builder() -> crate::operation::create_pipeline::builders::CreatePipelineOutputBuilder {
crate::operation::create_pipeline::builders::CreatePipelineOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreatePipelineOutputBuilder {
pub(crate) pipeline_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreatePipelineOutputBuilder {
pub fn pipeline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.pipeline_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_pipeline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.pipeline_id = input;
self
}
pub fn get_pipeline_id(&self) -> &::std::option::Option<::std::string::String> {
&self.pipeline_id
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_pipeline::CreatePipelineOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_pipeline::CreatePipelineOutput {
pipeline_id: self.pipeline_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"pipeline_id",
"pipeline_id was not specified but it is required when building CreatePipelineOutput",
)
})?,
_request_id: self._request_id,
})
}
}