1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Structure holding all <code>APPFLOW_INTEGRATION</code> specific workflow attributes.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AppflowIntegrationWorkflowAttributes {
/// <p>Specifies the source connector type, such as Salesforce, ServiceNow, and Marketo. Indicates source of ingestion.</p>
pub source_connector_type: crate::types::SourceConnectorType,
/// <p>The name of the AppFlow connector profile used for ingestion.</p>
pub connector_profile_name: ::std::string::String,
/// <p>The Amazon Resource Name (ARN) of the IAM role. Customer Profiles assumes this role to create resources on your behalf as part of workflow execution.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
}
impl AppflowIntegrationWorkflowAttributes {
/// <p>Specifies the source connector type, such as Salesforce, ServiceNow, and Marketo. Indicates source of ingestion.</p>
pub fn source_connector_type(&self) -> &crate::types::SourceConnectorType {
&self.source_connector_type
}
/// <p>The name of the AppFlow connector profile used for ingestion.</p>
pub fn connector_profile_name(&self) -> &str {
use std::ops::Deref;
self.connector_profile_name.deref()
}
/// <p>The Amazon Resource Name (ARN) of the IAM role. Customer Profiles assumes this role to create resources on your behalf as part of workflow execution.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
}
impl AppflowIntegrationWorkflowAttributes {
/// Creates a new builder-style object to manufacture [`AppflowIntegrationWorkflowAttributes`](crate::types::AppflowIntegrationWorkflowAttributes).
pub fn builder() -> crate::types::builders::AppflowIntegrationWorkflowAttributesBuilder {
crate::types::builders::AppflowIntegrationWorkflowAttributesBuilder::default()
}
}
/// A builder for [`AppflowIntegrationWorkflowAttributes`](crate::types::AppflowIntegrationWorkflowAttributes).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AppflowIntegrationWorkflowAttributesBuilder {
pub(crate) source_connector_type: ::std::option::Option<crate::types::SourceConnectorType>,
pub(crate) connector_profile_name: ::std::option::Option<::std::string::String>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
}
impl AppflowIntegrationWorkflowAttributesBuilder {
/// <p>Specifies the source connector type, such as Salesforce, ServiceNow, and Marketo. Indicates source of ingestion.</p>
/// This field is required.
pub fn source_connector_type(mut self, input: crate::types::SourceConnectorType) -> Self {
self.source_connector_type = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the source connector type, such as Salesforce, ServiceNow, and Marketo. Indicates source of ingestion.</p>
pub fn set_source_connector_type(mut self, input: ::std::option::Option<crate::types::SourceConnectorType>) -> Self {
self.source_connector_type = input;
self
}
/// <p>Specifies the source connector type, such as Salesforce, ServiceNow, and Marketo. Indicates source of ingestion.</p>
pub fn get_source_connector_type(&self) -> &::std::option::Option<crate::types::SourceConnectorType> {
&self.source_connector_type
}
/// <p>The name of the AppFlow connector profile used for ingestion.</p>
/// This field is required.
pub fn connector_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.connector_profile_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the AppFlow connector profile used for ingestion.</p>
pub fn set_connector_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.connector_profile_name = input;
self
}
/// <p>The name of the AppFlow connector profile used for ingestion.</p>
pub fn get_connector_profile_name(&self) -> &::std::option::Option<::std::string::String> {
&self.connector_profile_name
}
/// <p>The Amazon Resource Name (ARN) of the IAM role. Customer Profiles assumes this role to create resources on your behalf as part of workflow execution.</p>
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role. Customer Profiles assumes this role to create resources on your behalf as part of workflow execution.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role. Customer Profiles assumes this role to create resources on your behalf as part of workflow execution.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// Consumes the builder and constructs a [`AppflowIntegrationWorkflowAttributes`](crate::types::AppflowIntegrationWorkflowAttributes).
/// This method will fail if any of the following fields are not set:
/// - [`source_connector_type`](crate::types::builders::AppflowIntegrationWorkflowAttributesBuilder::source_connector_type)
/// - [`connector_profile_name`](crate::types::builders::AppflowIntegrationWorkflowAttributesBuilder::connector_profile_name)
pub fn build(
self,
) -> ::std::result::Result<crate::types::AppflowIntegrationWorkflowAttributes, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::AppflowIntegrationWorkflowAttributes {
source_connector_type: self.source_connector_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"source_connector_type",
"source_connector_type was not specified but it is required when building AppflowIntegrationWorkflowAttributes",
)
})?,
connector_profile_name: self.connector_profile_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"connector_profile_name",
"connector_profile_name was not specified but it is required when building AppflowIntegrationWorkflowAttributes",
)
})?,
role_arn: self.role_arn,
})
}
}