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 CreateIntegrationAssociationInput {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of information to be ingested.</p>
    pub integration_type: ::std::option::Option<crate::types::IntegrationType>,
    /// <p>The Amazon Resource Name (ARN) of the integration.</p><note>
    /// <p>When integrating with Amazon Web Services End User Messaging, the Amazon Connect and Amazon Web Services End User Messaging instances must be in the same account.</p>
    /// </note>
    pub integration_arn: ::std::option::Option<::std::string::String>,
    /// <p>The URL for the external application. This field is only required for the EVENT integration type.</p>
    pub source_application_url: ::std::option::Option<::std::string::String>,
    /// <p>The name of the external application. This field is only required for the EVENT integration type.</p>
    pub source_application_name: ::std::option::Option<::std::string::String>,
    /// <p>The type of the data source. This field is only required for the EVENT integration type.</p>
    pub source_type: ::std::option::Option<crate::types::SourceType>,
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateIntegrationAssociationInput {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The type of information to be ingested.</p>
    pub fn integration_type(&self) -> ::std::option::Option<&crate::types::IntegrationType> {
        self.integration_type.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the integration.</p><note>
    /// <p>When integrating with Amazon Web Services End User Messaging, the Amazon Connect and Amazon Web Services End User Messaging instances must be in the same account.</p>
    /// </note>
    pub fn integration_arn(&self) -> ::std::option::Option<&str> {
        self.integration_arn.as_deref()
    }
    /// <p>The URL for the external application. This field is only required for the EVENT integration type.</p>
    pub fn source_application_url(&self) -> ::std::option::Option<&str> {
        self.source_application_url.as_deref()
    }
    /// <p>The name of the external application. This field is only required for the EVENT integration type.</p>
    pub fn source_application_name(&self) -> ::std::option::Option<&str> {
        self.source_application_name.as_deref()
    }
    /// <p>The type of the data source. This field is only required for the EVENT integration type.</p>
    pub fn source_type(&self) -> ::std::option::Option<&crate::types::SourceType> {
        self.source_type.as_ref()
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateIntegrationAssociationInput {
    /// Creates a new builder-style object to manufacture [`CreateIntegrationAssociationInput`](crate::operation::create_integration_association::CreateIntegrationAssociationInput).
    pub fn builder() -> crate::operation::create_integration_association::builders::CreateIntegrationAssociationInputBuilder {
        crate::operation::create_integration_association::builders::CreateIntegrationAssociationInputBuilder::default()
    }
}

/// A builder for [`CreateIntegrationAssociationInput`](crate::operation::create_integration_association::CreateIntegrationAssociationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateIntegrationAssociationInputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) integration_type: ::std::option::Option<crate::types::IntegrationType>,
    pub(crate) integration_arn: ::std::option::Option<::std::string::String>,
    pub(crate) source_application_url: ::std::option::Option<::std::string::String>,
    pub(crate) source_application_name: ::std::option::Option<::std::string::String>,
    pub(crate) source_type: ::std::option::Option<crate::types::SourceType>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateIntegrationAssociationInputBuilder {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the 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. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the 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. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The type of information to be ingested.</p>
    /// This field is required.
    pub fn integration_type(mut self, input: crate::types::IntegrationType) -> Self {
        self.integration_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of information to be ingested.</p>
    pub fn set_integration_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
        self.integration_type = input;
        self
    }
    /// <p>The type of information to be ingested.</p>
    pub fn get_integration_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
        &self.integration_type
    }
    /// <p>The Amazon Resource Name (ARN) of the integration.</p><note>
    /// <p>When integrating with Amazon Web Services End User Messaging, the Amazon Connect and Amazon Web Services End User Messaging instances must be in the same account.</p>
    /// </note>
    /// This field is required.
    pub fn integration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.integration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the integration.</p><note>
    /// <p>When integrating with Amazon Web Services End User Messaging, the Amazon Connect and Amazon Web Services End User Messaging instances must be in the same account.</p>
    /// </note>
    pub fn set_integration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.integration_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the integration.</p><note>
    /// <p>When integrating with Amazon Web Services End User Messaging, the Amazon Connect and Amazon Web Services End User Messaging instances must be in the same account.</p>
    /// </note>
    pub fn get_integration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.integration_arn
    }
    /// <p>The URL for the external application. This field is only required for the EVENT integration type.</p>
    pub fn source_application_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_application_url = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The URL for the external application. This field is only required for the EVENT integration type.</p>
    pub fn set_source_application_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_application_url = input;
        self
    }
    /// <p>The URL for the external application. This field is only required for the EVENT integration type.</p>
    pub fn get_source_application_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_application_url
    }
    /// <p>The name of the external application. This field is only required for the EVENT integration type.</p>
    pub fn source_application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_application_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the external application. This field is only required for the EVENT integration type.</p>
    pub fn set_source_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_application_name = input;
        self
    }
    /// <p>The name of the external application. This field is only required for the EVENT integration type.</p>
    pub fn get_source_application_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_application_name
    }
    /// <p>The type of the data source. This field is only required for the EVENT integration type.</p>
    pub fn source_type(mut self, input: crate::types::SourceType) -> Self {
        self.source_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the data source. This field is only required for the EVENT integration type.</p>
    pub fn set_source_type(mut self, input: ::std::option::Option<crate::types::SourceType>) -> Self {
        self.source_type = input;
        self
    }
    /// <p>The type of the data source. This field is only required for the EVENT integration type.</p>
    pub fn get_source_type(&self) -> &::std::option::Option<crate::types::SourceType> {
        &self.source_type
    }
    /// 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. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</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. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</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. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateIntegrationAssociationInput`](crate::operation::create_integration_association::CreateIntegrationAssociationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_integration_association::CreateIntegrationAssociationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_integration_association::CreateIntegrationAssociationInput {
            instance_id: self.instance_id,
            integration_type: self.integration_type,
            integration_arn: self.integration_arn,
            source_application_url: self.source_application_url,
            source_application_name: self.source_application_name,
            source_type: self.source_type,
            tags: self.tags,
        })
    }
}