aws-sdk-bedrockagent 1.124.0

AWS SDK for Agents for Amazon Bedrock
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteFlowVersionOutput {
    /// <p>The unique identifier of the flow.</p>
    pub id: ::std::string::String,
    /// <p>The version of the flow being deleted.</p>
    pub version: ::std::string::String,
    _request_id: Option<String>,
}
impl DeleteFlowVersionOutput {
    /// <p>The unique identifier of the flow.</p>
    pub fn id(&self) -> &str {
        use std::ops::Deref;
        self.id.deref()
    }
    /// <p>The version of the flow being deleted.</p>
    pub fn version(&self) -> &str {
        use std::ops::Deref;
        self.version.deref()
    }
}
impl ::aws_types::request_id::RequestId for DeleteFlowVersionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DeleteFlowVersionOutput {
    /// Creates a new builder-style object to manufacture [`DeleteFlowVersionOutput`](crate::operation::delete_flow_version::DeleteFlowVersionOutput).
    pub fn builder() -> crate::operation::delete_flow_version::builders::DeleteFlowVersionOutputBuilder {
        crate::operation::delete_flow_version::builders::DeleteFlowVersionOutputBuilder::default()
    }
}

/// A builder for [`DeleteFlowVersionOutput`](crate::operation::delete_flow_version::DeleteFlowVersionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteFlowVersionOutputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DeleteFlowVersionOutputBuilder {
    /// <p>The unique identifier of the flow.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The version of the flow being deleted.</p>
    /// This field is required.
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the flow being deleted.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>The version of the flow being deleted.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    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
    }
    /// Consumes the builder and constructs a [`DeleteFlowVersionOutput`](crate::operation::delete_flow_version::DeleteFlowVersionOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`id`](crate::operation::delete_flow_version::builders::DeleteFlowVersionOutputBuilder::id)
    /// - [`version`](crate::operation::delete_flow_version::builders::DeleteFlowVersionOutputBuilder::version)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_flow_version::DeleteFlowVersionOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_flow_version::DeleteFlowVersionOutput {
            id: self.id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "id",
                    "id was not specified but it is required when building DeleteFlowVersionOutput",
                )
            })?,
            version: self.version.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "version",
                    "version was not specified but it is required when building DeleteFlowVersionOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}