aws-sdk-deadline 1.79.0

AWS SDK for AWSDeadlineCloud
// 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)]
pub struct GetQueueEnvironmentOutput {
    /// <p>The queue environment ID.</p>
    pub queue_environment_id: ::std::string::String,
    /// <p>The name of the queue environment.</p>
    pub name: ::std::string::String,
    /// <p>The priority of the queue environment.</p>
    pub priority: i32,
    /// <p>The type of template for the queue environment.</p>
    pub template_type: crate::types::EnvironmentTemplateType,
    /// <p>The template for the queue environment.</p>
    pub template: ::std::string::String,
    /// <p>The date and time the resource was created.</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>The user or system that created this resource.&gt;</p>
    pub created_by: ::std::string::String,
    /// <p>The date and time the resource was updated.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The user or system that updated this resource.</p>
    pub updated_by: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetQueueEnvironmentOutput {
    /// <p>The queue environment ID.</p>
    pub fn queue_environment_id(&self) -> &str {
        use std::ops::Deref;
        self.queue_environment_id.deref()
    }
    /// <p>The name of the queue environment.</p>
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// <p>The priority of the queue environment.</p>
    pub fn priority(&self) -> i32 {
        self.priority
    }
    /// <p>The type of template for the queue environment.</p>
    pub fn template_type(&self) -> &crate::types::EnvironmentTemplateType {
        &self.template_type
    }
    /// <p>The template for the queue environment.</p>
    pub fn template(&self) -> &str {
        use std::ops::Deref;
        self.template.deref()
    }
    /// <p>The date and time the resource was created.</p>
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// <p>The user or system that created this resource.&gt;</p>
    pub fn created_by(&self) -> &str {
        use std::ops::Deref;
        self.created_by.deref()
    }
    /// <p>The date and time the resource was updated.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The user or system that updated this resource.</p>
    pub fn updated_by(&self) -> ::std::option::Option<&str> {
        self.updated_by.as_deref()
    }
}
impl ::std::fmt::Debug for GetQueueEnvironmentOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetQueueEnvironmentOutput");
        formatter.field("queue_environment_id", &self.queue_environment_id);
        formatter.field("name", &self.name);
        formatter.field("priority", &self.priority);
        formatter.field("template_type", &self.template_type);
        formatter.field("template", &"*** Sensitive Data Redacted ***");
        formatter.field("created_at", &self.created_at);
        formatter.field("created_by", &self.created_by);
        formatter.field("updated_at", &self.updated_at);
        formatter.field("updated_by", &self.updated_by);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GetQueueEnvironmentOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetQueueEnvironmentOutput {
    /// Creates a new builder-style object to manufacture [`GetQueueEnvironmentOutput`](crate::operation::get_queue_environment::GetQueueEnvironmentOutput).
    pub fn builder() -> crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder {
        crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder::default()
    }
}

/// A builder for [`GetQueueEnvironmentOutput`](crate::operation::get_queue_environment::GetQueueEnvironmentOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetQueueEnvironmentOutputBuilder {
    pub(crate) queue_environment_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) priority: ::std::option::Option<i32>,
    pub(crate) template_type: ::std::option::Option<crate::types::EnvironmentTemplateType>,
    pub(crate) template: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_by: ::std::option::Option<::std::string::String>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_by: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetQueueEnvironmentOutputBuilder {
    /// <p>The queue environment ID.</p>
    /// This field is required.
    pub fn queue_environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.queue_environment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The queue environment ID.</p>
    pub fn set_queue_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.queue_environment_id = input;
        self
    }
    /// <p>The queue environment ID.</p>
    pub fn get_queue_environment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.queue_environment_id
    }
    /// <p>The name of the queue environment.</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>The name of the queue environment.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the queue environment.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The priority of the queue environment.</p>
    /// This field is required.
    pub fn priority(mut self, input: i32) -> Self {
        self.priority = ::std::option::Option::Some(input);
        self
    }
    /// <p>The priority of the queue environment.</p>
    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
        self.priority = input;
        self
    }
    /// <p>The priority of the queue environment.</p>
    pub fn get_priority(&self) -> &::std::option::Option<i32> {
        &self.priority
    }
    /// <p>The type of template for the queue environment.</p>
    /// This field is required.
    pub fn template_type(mut self, input: crate::types::EnvironmentTemplateType) -> Self {
        self.template_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of template for the queue environment.</p>
    pub fn set_template_type(mut self, input: ::std::option::Option<crate::types::EnvironmentTemplateType>) -> Self {
        self.template_type = input;
        self
    }
    /// <p>The type of template for the queue environment.</p>
    pub fn get_template_type(&self) -> &::std::option::Option<crate::types::EnvironmentTemplateType> {
        &self.template_type
    }
    /// <p>The template for the queue environment.</p>
    /// This field is required.
    pub fn template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.template = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The template for the queue environment.</p>
    pub fn set_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.template = input;
        self
    }
    /// <p>The template for the queue environment.</p>
    pub fn get_template(&self) -> &::std::option::Option<::std::string::String> {
        &self.template
    }
    /// <p>The date and time the resource was created.</p>
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the resource was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time the resource was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The user or system that created this resource.&gt;</p>
    /// This field is required.
    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.created_by = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user or system that created this resource.&gt;</p>
    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.created_by = input;
        self
    }
    /// <p>The user or system that created this resource.&gt;</p>
    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_by
    }
    /// <p>The date and time the resource was updated.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the resource was updated.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The date and time the resource was updated.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>The user or system that updated this resource.</p>
    pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.updated_by = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user or system that updated this resource.</p>
    pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.updated_by = input;
        self
    }
    /// <p>The user or system that updated this resource.</p>
    pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.updated_by
    }
    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 [`GetQueueEnvironmentOutput`](crate::operation::get_queue_environment::GetQueueEnvironmentOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`queue_environment_id`](crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder::queue_environment_id)
    /// - [`name`](crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder::name)
    /// - [`priority`](crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder::priority)
    /// - [`template_type`](crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder::template_type)
    /// - [`template`](crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder::template)
    /// - [`created_at`](crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder::created_at)
    /// - [`created_by`](crate::operation::get_queue_environment::builders::GetQueueEnvironmentOutputBuilder::created_by)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_queue_environment::GetQueueEnvironmentOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_queue_environment::GetQueueEnvironmentOutput {
            queue_environment_id: self.queue_environment_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "queue_environment_id",
                    "queue_environment_id was not specified but it is required when building GetQueueEnvironmentOutput",
                )
            })?,
            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 GetQueueEnvironmentOutput",
                )
            })?,
            priority: self.priority.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "priority",
                    "priority was not specified but it is required when building GetQueueEnvironmentOutput",
                )
            })?,
            template_type: self.template_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "template_type",
                    "template_type was not specified but it is required when building GetQueueEnvironmentOutput",
                )
            })?,
            template: self.template.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "template",
                    "template was not specified but it is required when building GetQueueEnvironmentOutput",
                )
            })?,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building GetQueueEnvironmentOutput",
                )
            })?,
            created_by: self.created_by.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_by",
                    "created_by was not specified but it is required when building GetQueueEnvironmentOutput",
                )
            })?,
            updated_at: self.updated_at,
            updated_by: self.updated_by,
            _request_id: self._request_id,
        })
    }
}
impl ::std::fmt::Debug for GetQueueEnvironmentOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetQueueEnvironmentOutputBuilder");
        formatter.field("queue_environment_id", &self.queue_environment_id);
        formatter.field("name", &self.name);
        formatter.field("priority", &self.priority);
        formatter.field("template_type", &self.template_type);
        formatter.field("template", &"*** Sensitive Data Redacted ***");
        formatter.field("created_at", &self.created_at);
        formatter.field("created_by", &self.created_by);
        formatter.field("updated_at", &self.updated_at);
        formatter.field("updated_by", &self.updated_by);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}