aws-sdk-connect 1.166.0

AWS SDK for Amazon Connect Service
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 CreateTestCaseInput {
    /// <p>The identifier of the Amazon Connect instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the test.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the test.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The JSON string that represents the content of the test.</p>
    pub content: ::std::option::Option<::std::string::String>,
    /// <p>Defines the starting point for your test.</p>
    pub entry_point: ::std::option::Option<crate::types::TestCaseEntryPoint>,
    /// <p>Defines the initial custom attributes for your test.</p>
    pub initialization_data: ::std::option::Option<::std::string::String>,
    /// <p>Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.</p>
    pub status: ::std::option::Option<crate::types::TestCaseStatus>,
    /// <p>Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency</p>
    pub test_case_id: ::std::option::Option<::std::string::String>,
    /// <p>The tags used to organize, track, or control access for this resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The time at which the resource was last modified.</p>
    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The region in which the resource was last modified</p>
    pub last_modified_region: ::std::option::Option<::std::string::String>,
}
impl CreateTestCaseInput {
    /// <p>The identifier of the Amazon Connect instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The name of the test.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the test.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The JSON string that represents the content of the test.</p>
    pub fn content(&self) -> ::std::option::Option<&str> {
        self.content.as_deref()
    }
    /// <p>Defines the starting point for your test.</p>
    pub fn entry_point(&self) -> ::std::option::Option<&crate::types::TestCaseEntryPoint> {
        self.entry_point.as_ref()
    }
    /// <p>Defines the initial custom attributes for your test.</p>
    pub fn initialization_data(&self) -> ::std::option::Option<&str> {
        self.initialization_data.as_deref()
    }
    /// <p>Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::TestCaseStatus> {
        self.status.as_ref()
    }
    /// <p>Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency</p>
    pub fn test_case_id(&self) -> ::std::option::Option<&str> {
        self.test_case_id.as_deref()
    }
    /// <p>The tags used to organize, track, or control access for this resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The time at which the resource was last modified.</p>
    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_modified_time.as_ref()
    }
    /// <p>The region in which the resource was last modified</p>
    pub fn last_modified_region(&self) -> ::std::option::Option<&str> {
        self.last_modified_region.as_deref()
    }
}
impl CreateTestCaseInput {
    /// Creates a new builder-style object to manufacture [`CreateTestCaseInput`](crate::operation::create_test_case::CreateTestCaseInput).
    pub fn builder() -> crate::operation::create_test_case::builders::CreateTestCaseInputBuilder {
        crate::operation::create_test_case::builders::CreateTestCaseInputBuilder::default()
    }
}

/// A builder for [`CreateTestCaseInput`](crate::operation::create_test_case::CreateTestCaseInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateTestCaseInputBuilder {
    pub(crate) instance_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) content: ::std::option::Option<::std::string::String>,
    pub(crate) entry_point: ::std::option::Option<crate::types::TestCaseEntryPoint>,
    pub(crate) initialization_data: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::TestCaseStatus>,
    pub(crate) test_case_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified_region: ::std::option::Option<::std::string::String>,
}
impl CreateTestCaseInputBuilder {
    /// <p>The identifier of the Amazon Connect instance.</p>
    /// This field is required.
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon Connect instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The identifier of the Amazon Connect instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The name of the test.</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 test.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the test.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the test.</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 of the test.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the test.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The JSON string that represents the content of the test.</p>
    /// This field is required.
    pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The JSON string that represents the content of the test.</p>
    pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content = input;
        self
    }
    /// <p>The JSON string that represents the content of the test.</p>
    pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
        &self.content
    }
    /// <p>Defines the starting point for your test.</p>
    pub fn entry_point(mut self, input: crate::types::TestCaseEntryPoint) -> Self {
        self.entry_point = ::std::option::Option::Some(input);
        self
    }
    /// <p>Defines the starting point for your test.</p>
    pub fn set_entry_point(mut self, input: ::std::option::Option<crate::types::TestCaseEntryPoint>) -> Self {
        self.entry_point = input;
        self
    }
    /// <p>Defines the starting point for your test.</p>
    pub fn get_entry_point(&self) -> &::std::option::Option<crate::types::TestCaseEntryPoint> {
        &self.entry_point
    }
    /// <p>Defines the initial custom attributes for your test.</p>
    pub fn initialization_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.initialization_data = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Defines the initial custom attributes for your test.</p>
    pub fn set_initialization_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.initialization_data = input;
        self
    }
    /// <p>Defines the initial custom attributes for your test.</p>
    pub fn get_initialization_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.initialization_data
    }
    /// <p>Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.</p>
    pub fn status(mut self, input: crate::types::TestCaseStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TestCaseStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::TestCaseStatus> {
        &self.status
    }
    /// <p>Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency</p>
    pub fn test_case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.test_case_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency</p>
    pub fn set_test_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.test_case_id = input;
        self
    }
    /// <p>Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency</p>
    pub fn get_test_case_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.test_case_id
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags used to organize, track, or control access for this resource.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags used to organize, track, or control access for this resource.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags used to organize, track, or control access for this resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The time at which the resource was last modified.</p>
    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the resource was last modified.</p>
    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_time = input;
        self
    }
    /// <p>The time at which the resource was last modified.</p>
    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_time
    }
    /// <p>The region in which the resource was last modified</p>
    pub fn last_modified_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_modified_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The region in which the resource was last modified</p>
    pub fn set_last_modified_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_modified_region = input;
        self
    }
    /// <p>The region in which the resource was last modified</p>
    pub fn get_last_modified_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_modified_region
    }
    /// Consumes the builder and constructs a [`CreateTestCaseInput`](crate::operation::create_test_case::CreateTestCaseInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_test_case::CreateTestCaseInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_test_case::CreateTestCaseInput {
            instance_id: self.instance_id,
            name: self.name,
            description: self.description,
            content: self.content,
            entry_point: self.entry_point,
            initialization_data: self.initialization_data,
            status: self.status,
            test_case_id: self.test_case_id,
            tags: self.tags,
            last_modified_time: self.last_modified_time,
            last_modified_region: self.last_modified_region,
        })
    }
}