aws-sdk-deadline 1.50.0

AWS SDK for AWSDeadlineCloud
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)]
pub struct CreateQueueEnvironmentInput {
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The farm ID of the farm to connect to the environment.</p>
    pub farm_id: ::std::option::Option<::std::string::String>,
    /// <p>The queue ID to connect the queue and environment.</p>
    pub queue_id: ::std::option::Option<::std::string::String>,
    /// <p>Sets the priority of the environments in the queue from 0 to 10,000, where 0 is the highest priority. If two environments share the same priority value, the environment created first takes higher priority.</p>
    pub priority: ::std::option::Option<i32>,
    /// <p>The template's file type, <code>JSON</code> or <code>YAML</code>.</p>
    pub template_type: ::std::option::Option<crate::types::EnvironmentTemplateType>,
    /// <p>The environment template to use in the queue.</p>
    pub template: ::std::option::Option<::std::string::String>,
}
impl CreateQueueEnvironmentInput {
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The farm ID of the farm to connect to the environment.</p>
    pub fn farm_id(&self) -> ::std::option::Option<&str> {
        self.farm_id.as_deref()
    }
    /// <p>The queue ID to connect the queue and environment.</p>
    pub fn queue_id(&self) -> ::std::option::Option<&str> {
        self.queue_id.as_deref()
    }
    /// <p>Sets the priority of the environments in the queue from 0 to 10,000, where 0 is the highest priority. If two environments share the same priority value, the environment created first takes higher priority.</p>
    pub fn priority(&self) -> ::std::option::Option<i32> {
        self.priority
    }
    /// <p>The template's file type, <code>JSON</code> or <code>YAML</code>.</p>
    pub fn template_type(&self) -> ::std::option::Option<&crate::types::EnvironmentTemplateType> {
        self.template_type.as_ref()
    }
    /// <p>The environment template to use in the queue.</p>
    pub fn template(&self) -> ::std::option::Option<&str> {
        self.template.as_deref()
    }
}
impl ::std::fmt::Debug for CreateQueueEnvironmentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateQueueEnvironmentInput");
        formatter.field("client_token", &self.client_token);
        formatter.field("farm_id", &self.farm_id);
        formatter.field("queue_id", &self.queue_id);
        formatter.field("priority", &self.priority);
        formatter.field("template_type", &self.template_type);
        formatter.field("template", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateQueueEnvironmentInput {
    /// Creates a new builder-style object to manufacture [`CreateQueueEnvironmentInput`](crate::operation::create_queue_environment::CreateQueueEnvironmentInput).
    pub fn builder() -> crate::operation::create_queue_environment::builders::CreateQueueEnvironmentInputBuilder {
        crate::operation::create_queue_environment::builders::CreateQueueEnvironmentInputBuilder::default()
    }
}

/// A builder for [`CreateQueueEnvironmentInput`](crate::operation::create_queue_environment::CreateQueueEnvironmentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateQueueEnvironmentInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
    pub(crate) queue_id: ::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>,
}
impl CreateQueueEnvironmentInputBuilder {
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The farm ID of the farm to connect to the environment.</p>
    /// This field is required.
    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.farm_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The farm ID of the farm to connect to the environment.</p>
    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.farm_id = input;
        self
    }
    /// <p>The farm ID of the farm to connect to the environment.</p>
    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.farm_id
    }
    /// <p>The queue ID to connect the queue and environment.</p>
    /// This field is required.
    pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.queue_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The queue ID to connect the queue and environment.</p>
    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.queue_id = input;
        self
    }
    /// <p>The queue ID to connect the queue and environment.</p>
    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.queue_id
    }
    /// <p>Sets the priority of the environments in the queue from 0 to 10,000, where 0 is the highest priority. If two environments share the same priority value, the environment created first takes higher priority.</p>
    /// This field is required.
    pub fn priority(mut self, input: i32) -> Self {
        self.priority = ::std::option::Option::Some(input);
        self
    }
    /// <p>Sets the priority of the environments in the queue from 0 to 10,000, where 0 is the highest priority. If two environments share the same priority value, the environment created first takes higher priority.</p>
    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
        self.priority = input;
        self
    }
    /// <p>Sets the priority of the environments in the queue from 0 to 10,000, where 0 is the highest priority. If two environments share the same priority value, the environment created first takes higher priority.</p>
    pub fn get_priority(&self) -> &::std::option::Option<i32> {
        &self.priority
    }
    /// <p>The template's file type, <code>JSON</code> or <code>YAML</code>.</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 template's file type, <code>JSON</code> or <code>YAML</code>.</p>
    pub fn set_template_type(mut self, input: ::std::option::Option<crate::types::EnvironmentTemplateType>) -> Self {
        self.template_type = input;
        self
    }
    /// <p>The template's file type, <code>JSON</code> or <code>YAML</code>.</p>
    pub fn get_template_type(&self) -> &::std::option::Option<crate::types::EnvironmentTemplateType> {
        &self.template_type
    }
    /// <p>The environment template to use in the queue.</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 environment template to use in the queue.</p>
    pub fn set_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.template = input;
        self
    }
    /// <p>The environment template to use in the queue.</p>
    pub fn get_template(&self) -> &::std::option::Option<::std::string::String> {
        &self.template
    }
    /// Consumes the builder and constructs a [`CreateQueueEnvironmentInput`](crate::operation::create_queue_environment::CreateQueueEnvironmentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_queue_environment::CreateQueueEnvironmentInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_queue_environment::CreateQueueEnvironmentInput {
            client_token: self.client_token,
            farm_id: self.farm_id,
            queue_id: self.queue_id,
            priority: self.priority,
            template_type: self.template_type,
            template: self.template,
        })
    }
}
impl ::std::fmt::Debug for CreateQueueEnvironmentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateQueueEnvironmentInputBuilder");
        formatter.field("client_token", &self.client_token);
        formatter.field("farm_id", &self.farm_id);
        formatter.field("queue_id", &self.queue_id);
        formatter.field("priority", &self.priority);
        formatter.field("template_type", &self.template_type);
        formatter.field("template", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}