aws-sdk-context 1.0.0

AWS SDK for AWS Context
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 StartTaskInput {
    /// <p>The agent context, as an ID or ARN.</p>
    pub agent_context_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <code>ValidationException</code>.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>A description of the task. Up to 1,024 characters, with no control characters.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
    pub input_configuration: ::std::option::Option<crate::types::TaskInputConfiguration>,
    /// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
    pub access_control_config: ::std::option::Option<crate::types::AccessControlConfig>,
}
impl StartTaskInput {
    /// <p>The agent context, as an ID or ARN.</p>
    pub fn agent_context_id(&self) -> ::std::option::Option<&str> {
        self.agent_context_id.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <code>ValidationException</code>.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>A description of the task. Up to 1,024 characters, with no control characters.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
    pub fn input_configuration(&self) -> ::std::option::Option<&crate::types::TaskInputConfiguration> {
        self.input_configuration.as_ref()
    }
    /// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
    pub fn access_control_config(&self) -> ::std::option::Option<&crate::types::AccessControlConfig> {
        self.access_control_config.as_ref()
    }
}
impl ::std::fmt::Debug for StartTaskInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartTaskInput");
        formatter.field("agent_context_id", &self.agent_context_id);
        formatter.field("client_token", &self.client_token);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("input_configuration", &self.input_configuration);
        formatter.field("access_control_config", &self.access_control_config);
        formatter.finish()
    }
}
impl StartTaskInput {
    /// Creates a new builder-style object to manufacture [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
    pub fn builder() -> crate::operation::start_task::builders::StartTaskInputBuilder {
        crate::operation::start_task::builders::StartTaskInputBuilder::default()
    }
}

/// A builder for [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartTaskInputBuilder {
    pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) input_configuration: ::std::option::Option<crate::types::TaskInputConfiguration>,
    pub(crate) access_control_config: ::std::option::Option<crate::types::AccessControlConfig>,
}
impl StartTaskInputBuilder {
    /// <p>The agent context, as an ID or ARN.</p>
    /// This field is required.
    pub fn agent_context_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_context_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The agent context, as an ID or ARN.</p>
    pub fn set_agent_context_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_context_id = input;
        self
    }
    /// <p>The agent context, as an ID or ARN.</p>
    pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_context_id
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <code>ValidationException</code>.</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>A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <code>ValidationException</code>.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure that the request completes no more than one time. The token is scoped to your account and the agent context. If you reuse a token on the same agent context with different parameters, the request fails with <code>ValidationException</code>.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>A description of the task. Up to 1,024 characters, with no control characters.</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>A description of the task. Up to 1,024 characters, with no control characters.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the task. Up to 1,024 characters, with no control characters.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
    /// This field is required.
    pub fn input_configuration(mut self, input: crate::types::TaskInputConfiguration) -> Self {
        self.input_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
    pub fn set_input_configuration(mut self, input: ::std::option::Option<crate::types::TaskInputConfiguration>) -> Self {
        self.input_configuration = input;
        self
    }
    /// <p>What the task imports. Set exactly one member. The member that you set determines the task's <code>type</code>.</p>
    pub fn get_input_configuration(&self) -> &::std::option::Option<crate::types::TaskInputConfiguration> {
        &self.input_configuration
    }
    /// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
    pub fn access_control_config(mut self, input: crate::types::AccessControlConfig) -> Self {
        self.access_control_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
    pub fn set_access_control_config(mut self, input: ::std::option::Option<crate::types::AccessControlConfig>) -> Self {
        self.access_control_config = input;
        self
    }
    /// <p>Who can see the content that the task adds to the agent context. AWS Context supports only one entry: <code>ALLOW</code> with <code>principalId</code> <code>*</code>, so that every reader of the agent context can see it. If you omit it or send no entries, AWS Context uses that entry. If you name any other principal, include a <code>DENY</code> entry, or send more than one entry, the request fails with <code>ValidationException</code>, and no task is started.</p>
    pub fn get_access_control_config(&self) -> &::std::option::Option<crate::types::AccessControlConfig> {
        &self.access_control_config
    }
    /// Consumes the builder and constructs a [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::start_task::StartTaskInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::start_task::StartTaskInput {
            agent_context_id: self.agent_context_id,
            client_token: self.client_token,
            description: self.description,
            input_configuration: self.input_configuration,
            access_control_config: self.access_control_config,
        })
    }
}
impl ::std::fmt::Debug for StartTaskInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartTaskInputBuilder");
        formatter.field("agent_context_id", &self.agent_context_id);
        formatter.field("client_token", &self.client_token);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("input_configuration", &self.input_configuration);
        formatter.field("access_control_config", &self.access_control_config);
        formatter.finish()
    }
}