aws-sdk-bedrockagentruntime 1.126.0

AWS SDK for Agents for Amazon Bedrock Runtime
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 GetFlowExecutionOutput {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the flow execution.</p>
    pub execution_arn: ::std::string::String,
    /// <p>The current status of the flow execution.</p>
    /// <p>Flow executions time out after 24 hours.</p>
    pub status: crate::types::FlowExecutionStatus,
    /// <p>The timestamp when the flow execution started.</p>
    pub started_at: ::aws_smithy_types::DateTime,
    /// <p>The timestamp when the flow execution ended. This field is only populated when the execution has completed, failed, timed out, or been aborted.</p>
    pub ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A list of errors that occurred during the flow execution. Each error includes an error code, message, and the node where the error occurred, if applicable.</p>
    pub errors: ::std::option::Option<::std::vec::Vec<crate::types::FlowExecutionError>>,
    /// <p>The unique identifier of the flow alias used for the execution.</p>
    pub flow_alias_identifier: ::std::string::String,
    /// <p>The unique identifier of the flow.</p>
    pub flow_identifier: ::std::string::String,
    /// <p>The version of the flow used for the execution.</p>
    pub flow_version: ::std::string::String,
    _request_id: Option<String>,
}
impl GetFlowExecutionOutput {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the flow execution.</p>
    pub fn execution_arn(&self) -> &str {
        use std::ops::Deref;
        self.execution_arn.deref()
    }
    /// <p>The current status of the flow execution.</p>
    /// <p>Flow executions time out after 24 hours.</p>
    pub fn status(&self) -> &crate::types::FlowExecutionStatus {
        &self.status
    }
    /// <p>The timestamp when the flow execution started.</p>
    pub fn started_at(&self) -> &::aws_smithy_types::DateTime {
        &self.started_at
    }
    /// <p>The timestamp when the flow execution ended. This field is only populated when the execution has completed, failed, timed out, or been aborted.</p>
    pub fn ended_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.ended_at.as_ref()
    }
    /// <p>A list of errors that occurred during the flow execution. Each error includes an error code, message, and the node where the error occurred, if applicable.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.errors.is_none()`.
    pub fn errors(&self) -> &[crate::types::FlowExecutionError] {
        self.errors.as_deref().unwrap_or_default()
    }
    /// <p>The unique identifier of the flow alias used for the execution.</p>
    pub fn flow_alias_identifier(&self) -> &str {
        use std::ops::Deref;
        self.flow_alias_identifier.deref()
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn flow_identifier(&self) -> &str {
        use std::ops::Deref;
        self.flow_identifier.deref()
    }
    /// <p>The version of the flow used for the execution.</p>
    pub fn flow_version(&self) -> &str {
        use std::ops::Deref;
        self.flow_version.deref()
    }
}
impl ::aws_types::request_id::RequestId for GetFlowExecutionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetFlowExecutionOutput {
    /// Creates a new builder-style object to manufacture [`GetFlowExecutionOutput`](crate::operation::get_flow_execution::GetFlowExecutionOutput).
    pub fn builder() -> crate::operation::get_flow_execution::builders::GetFlowExecutionOutputBuilder {
        crate::operation::get_flow_execution::builders::GetFlowExecutionOutputBuilder::default()
    }
}

/// A builder for [`GetFlowExecutionOutput`](crate::operation::get_flow_execution::GetFlowExecutionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetFlowExecutionOutputBuilder {
    pub(crate) execution_arn: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::FlowExecutionStatus>,
    pub(crate) started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::FlowExecutionError>>,
    pub(crate) flow_alias_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) flow_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) flow_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetFlowExecutionOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the flow execution.</p>
    /// This field is required.
    pub fn execution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.execution_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the flow execution.</p>
    pub fn set_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.execution_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the flow execution.</p>
    pub fn get_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.execution_arn
    }
    /// <p>The current status of the flow execution.</p>
    /// <p>Flow executions time out after 24 hours.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::FlowExecutionStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the flow execution.</p>
    /// <p>Flow executions time out after 24 hours.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FlowExecutionStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the flow execution.</p>
    /// <p>Flow executions time out after 24 hours.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::FlowExecutionStatus> {
        &self.status
    }
    /// <p>The timestamp when the flow execution started.</p>
    /// This field is required.
    pub fn started_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.started_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the flow execution started.</p>
    pub fn set_started_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.started_at = input;
        self
    }
    /// <p>The timestamp when the flow execution started.</p>
    pub fn get_started_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.started_at
    }
    /// <p>The timestamp when the flow execution ended. This field is only populated when the execution has completed, failed, timed out, or been aborted.</p>
    pub fn ended_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.ended_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the flow execution ended. This field is only populated when the execution has completed, failed, timed out, or been aborted.</p>
    pub fn set_ended_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.ended_at = input;
        self
    }
    /// <p>The timestamp when the flow execution ended. This field is only populated when the execution has completed, failed, timed out, or been aborted.</p>
    pub fn get_ended_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.ended_at
    }
    /// Appends an item to `errors`.
    ///
    /// To override the contents of this collection use [`set_errors`](Self::set_errors).
    ///
    /// <p>A list of errors that occurred during the flow execution. Each error includes an error code, message, and the node where the error occurred, if applicable.</p>
    pub fn errors(mut self, input: crate::types::FlowExecutionError) -> Self {
        let mut v = self.errors.unwrap_or_default();
        v.push(input);
        self.errors = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of errors that occurred during the flow execution. Each error includes an error code, message, and the node where the error occurred, if applicable.</p>
    pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FlowExecutionError>>) -> Self {
        self.errors = input;
        self
    }
    /// <p>A list of errors that occurred during the flow execution. Each error includes an error code, message, and the node where the error occurred, if applicable.</p>
    pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowExecutionError>> {
        &self.errors
    }
    /// <p>The unique identifier of the flow alias used for the execution.</p>
    /// This field is required.
    pub fn flow_alias_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_alias_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the flow alias used for the execution.</p>
    pub fn set_flow_alias_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_alias_identifier = input;
        self
    }
    /// <p>The unique identifier of the flow alias used for the execution.</p>
    pub fn get_flow_alias_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_alias_identifier
    }
    /// <p>The unique identifier of the flow.</p>
    /// This field is required.
    pub fn flow_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn set_flow_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_identifier = input;
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn get_flow_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_identifier
    }
    /// <p>The version of the flow used for the execution.</p>
    /// This field is required.
    pub fn flow_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the flow used for the execution.</p>
    pub fn set_flow_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_version = input;
        self
    }
    /// <p>The version of the flow used for the execution.</p>
    pub fn get_flow_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_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 [`GetFlowExecutionOutput`](crate::operation::get_flow_execution::GetFlowExecutionOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`execution_arn`](crate::operation::get_flow_execution::builders::GetFlowExecutionOutputBuilder::execution_arn)
    /// - [`status`](crate::operation::get_flow_execution::builders::GetFlowExecutionOutputBuilder::status)
    /// - [`started_at`](crate::operation::get_flow_execution::builders::GetFlowExecutionOutputBuilder::started_at)
    /// - [`flow_alias_identifier`](crate::operation::get_flow_execution::builders::GetFlowExecutionOutputBuilder::flow_alias_identifier)
    /// - [`flow_identifier`](crate::operation::get_flow_execution::builders::GetFlowExecutionOutputBuilder::flow_identifier)
    /// - [`flow_version`](crate::operation::get_flow_execution::builders::GetFlowExecutionOutputBuilder::flow_version)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_flow_execution::GetFlowExecutionOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_flow_execution::GetFlowExecutionOutput {
            execution_arn: self.execution_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "execution_arn",
                    "execution_arn was not specified but it is required when building GetFlowExecutionOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building GetFlowExecutionOutput",
                )
            })?,
            started_at: self.started_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "started_at",
                    "started_at was not specified but it is required when building GetFlowExecutionOutput",
                )
            })?,
            ended_at: self.ended_at,
            errors: self.errors,
            flow_alias_identifier: self.flow_alias_identifier.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "flow_alias_identifier",
                    "flow_alias_identifier was not specified but it is required when building GetFlowExecutionOutput",
                )
            })?,
            flow_identifier: self.flow_identifier.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "flow_identifier",
                    "flow_identifier was not specified but it is required when building GetFlowExecutionOutput",
                )
            })?,
            flow_version: self.flow_version.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "flow_version",
                    "flow_version was not specified but it is required when building GetFlowExecutionOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}