aws-sdk-quicksight 1.135.0

AWS SDK for Amazon QuickSight
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 GetFlowMetadataOutput {
    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
    pub arn: ::std::string::String,
    /// <p>The unique identifier of the flow.</p>
    pub flow_id: ::std::string::String,
    /// <p>A display name for the flow.</p>
    pub name: ::std::string::String,
    /// <p>The description for the flow.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The publish state for the flow. Valid values are <code>DRAFT</code>, <code>PUBLISHED</code>, or <code>PENDING_APPROVAL</code>.</p>
    pub publish_state: ::std::option::Option<crate::types::FlowPublishState>,
    /// <p>The number of users who have used the flow.</p>
    pub user_count: i32,
    /// <p>The number of runs done for the flow.</p>
    pub run_count: i32,
    /// <p>The time this flow was created.</p>
    pub created_time: ::aws_smithy_types::DateTime,
    /// <p>The last time this flow was modified.</p>
    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub request_id: ::std::option::Option<::std::string::String>,
    /// <p>The HTTP status of the request.</p>
    pub status: i32,
    _request_id: Option<String>,
}
impl GetFlowMetadataOutput {
    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn flow_id(&self) -> &str {
        use std::ops::Deref;
        self.flow_id.deref()
    }
    /// <p>A display name for the flow.</p>
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// <p>The description for the flow.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The publish state for the flow. Valid values are <code>DRAFT</code>, <code>PUBLISHED</code>, or <code>PENDING_APPROVAL</code>.</p>
    pub fn publish_state(&self) -> ::std::option::Option<&crate::types::FlowPublishState> {
        self.publish_state.as_ref()
    }
    /// <p>The number of users who have used the flow.</p>
    pub fn user_count(&self) -> i32 {
        self.user_count
    }
    /// <p>The number of runs done for the flow.</p>
    pub fn run_count(&self) -> i32 {
        self.run_count
    }
    /// <p>The time this flow was created.</p>
    pub fn created_time(&self) -> &::aws_smithy_types::DateTime {
        &self.created_time
    }
    /// <p>The last time this flow was modified.</p>
    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_time.as_ref()
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(&self) -> ::std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>The HTTP status of the request.</p>
    pub fn status(&self) -> i32 {
        self.status
    }
}
impl ::aws_types::request_id::RequestId for GetFlowMetadataOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetFlowMetadataOutput {
    /// Creates a new builder-style object to manufacture [`GetFlowMetadataOutput`](crate::operation::get_flow_metadata::GetFlowMetadataOutput).
    pub fn builder() -> crate::operation::get_flow_metadata::builders::GetFlowMetadataOutputBuilder {
        crate::operation::get_flow_metadata::builders::GetFlowMetadataOutputBuilder::default()
    }
}

/// A builder for [`GetFlowMetadataOutput`](crate::operation::get_flow_metadata::GetFlowMetadataOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetFlowMetadataOutputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) flow_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) publish_state: ::std::option::Option<crate::types::FlowPublishState>,
    pub(crate) user_count: ::std::option::Option<i32>,
    pub(crate) run_count: ::std::option::Option<i32>,
    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) request_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl GetFlowMetadataOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the flow.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The unique identifier of the flow.</p>
    /// This field is required.
    pub fn flow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn set_flow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_id = input;
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn get_flow_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_id
    }
    /// <p>A display name for the flow.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A display name for the flow.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A display name for the flow.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description for the flow.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description for the flow.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description for the flow.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The publish state for the flow. Valid values are <code>DRAFT</code>, <code>PUBLISHED</code>, or <code>PENDING_APPROVAL</code>.</p>
    pub fn publish_state(mut self, input: crate::types::FlowPublishState) -> Self {
        self.publish_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The publish state for the flow. Valid values are <code>DRAFT</code>, <code>PUBLISHED</code>, or <code>PENDING_APPROVAL</code>.</p>
    pub fn set_publish_state(mut self, input: ::std::option::Option<crate::types::FlowPublishState>) -> Self {
        self.publish_state = input;
        self
    }
    /// <p>The publish state for the flow. Valid values are <code>DRAFT</code>, <code>PUBLISHED</code>, or <code>PENDING_APPROVAL</code>.</p>
    pub fn get_publish_state(&self) -> &::std::option::Option<crate::types::FlowPublishState> {
        &self.publish_state
    }
    /// <p>The number of users who have used the flow.</p>
    pub fn user_count(mut self, input: i32) -> Self {
        self.user_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of users who have used the flow.</p>
    pub fn set_user_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.user_count = input;
        self
    }
    /// <p>The number of users who have used the flow.</p>
    pub fn get_user_count(&self) -> &::std::option::Option<i32> {
        &self.user_count
    }
    /// <p>The number of runs done for the flow.</p>
    pub fn run_count(mut self, input: i32) -> Self {
        self.run_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of runs done for the flow.</p>
    pub fn set_run_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.run_count = input;
        self
    }
    /// <p>The number of runs done for the flow.</p>
    pub fn get_run_count(&self) -> &::std::option::Option<i32> {
        &self.run_count
    }
    /// <p>The time this flow was created.</p>
    /// This field is required.
    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time this flow was created.</p>
    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_time = input;
        self
    }
    /// <p>The time this flow was created.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    /// <p>The last time this flow was modified.</p>
    pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last time this flow was modified.</p>
    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_time = input;
        self
    }
    /// <p>The last time this flow was modified.</p>
    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_id
    }
    /// <p>The HTTP status of the request.</p>
    pub fn status(mut self, input: i32) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The HTTP status of the request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
        self.status = input;
        self
    }
    /// <p>The HTTP status of the request.</p>
    pub fn get_status(&self) -> &::std::option::Option<i32> {
        &self.status
    }
    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 [`GetFlowMetadataOutput`](crate::operation::get_flow_metadata::GetFlowMetadataOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`arn`](crate::operation::get_flow_metadata::builders::GetFlowMetadataOutputBuilder::arn)
    /// - [`flow_id`](crate::operation::get_flow_metadata::builders::GetFlowMetadataOutputBuilder::flow_id)
    /// - [`name`](crate::operation::get_flow_metadata::builders::GetFlowMetadataOutputBuilder::name)
    /// - [`created_time`](crate::operation::get_flow_metadata::builders::GetFlowMetadataOutputBuilder::created_time)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_flow_metadata::GetFlowMetadataOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_flow_metadata::GetFlowMetadataOutput {
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building GetFlowMetadataOutput",
                )
            })?,
            flow_id: self.flow_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "flow_id",
                    "flow_id was not specified but it is required when building GetFlowMetadataOutput",
                )
            })?,
            name: self.name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "name",
                    "name was not specified but it is required when building GetFlowMetadataOutput",
                )
            })?,
            description: self.description,
            publish_state: self.publish_state,
            user_count: self.user_count.unwrap_or_default(),
            run_count: self.run_count.unwrap_or_default(),
            created_time: self.created_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_time",
                    "created_time was not specified but it is required when building GetFlowMetadataOutput",
                )
            })?,
            last_updated_time: self.last_updated_time,
            request_id: self.request_id,
            status: self.status.unwrap_or_default(),
            _request_id: self._request_id,
        })
    }
}