aws-sdk-appflow 1.98.0

AWS SDK for Amazon Appflow
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 DescribeConnectorsOutput {
    /// <p>The configuration that is applied to the connectors used in the flow.</p>
    pub connector_configurations:
        ::std::option::Option<::std::collections::HashMap<crate::types::ConnectorType, crate::types::ConnectorConfiguration>>,
    /// <p>Information about the connectors supported in Amazon AppFlow.</p>
    pub connectors: ::std::option::Option<::std::vec::Vec<crate::types::ConnectorDetail>>,
    /// <p>The pagination token for the next page of data.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeConnectorsOutput {
    /// <p>The configuration that is applied to the connectors used in the flow.</p>
    pub fn connector_configurations(
        &self,
    ) -> ::std::option::Option<&::std::collections::HashMap<crate::types::ConnectorType, crate::types::ConnectorConfiguration>> {
        self.connector_configurations.as_ref()
    }
    /// <p>Information about the connectors supported in Amazon AppFlow.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.connectors.is_none()`.
    pub fn connectors(&self) -> &[crate::types::ConnectorDetail] {
        self.connectors.as_deref().unwrap_or_default()
    }
    /// <p>The pagination token for the next page of data.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeConnectorsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeConnectorsOutput {
    /// Creates a new builder-style object to manufacture [`DescribeConnectorsOutput`](crate::operation::describe_connectors::DescribeConnectorsOutput).
    pub fn builder() -> crate::operation::describe_connectors::builders::DescribeConnectorsOutputBuilder {
        crate::operation::describe_connectors::builders::DescribeConnectorsOutputBuilder::default()
    }
}

/// A builder for [`DescribeConnectorsOutput`](crate::operation::describe_connectors::DescribeConnectorsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeConnectorsOutputBuilder {
    pub(crate) connector_configurations:
        ::std::option::Option<::std::collections::HashMap<crate::types::ConnectorType, crate::types::ConnectorConfiguration>>,
    pub(crate) connectors: ::std::option::Option<::std::vec::Vec<crate::types::ConnectorDetail>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeConnectorsOutputBuilder {
    /// Adds a key-value pair to `connector_configurations`.
    ///
    /// To override the contents of this collection use [`set_connector_configurations`](Self::set_connector_configurations).
    ///
    /// <p>The configuration that is applied to the connectors used in the flow.</p>
    pub fn connector_configurations(mut self, k: crate::types::ConnectorType, v: crate::types::ConnectorConfiguration) -> Self {
        let mut hash_map = self.connector_configurations.unwrap_or_default();
        hash_map.insert(k, v);
        self.connector_configurations = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The configuration that is applied to the connectors used in the flow.</p>
    pub fn set_connector_configurations(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<crate::types::ConnectorType, crate::types::ConnectorConfiguration>>,
    ) -> Self {
        self.connector_configurations = input;
        self
    }
    /// <p>The configuration that is applied to the connectors used in the flow.</p>
    pub fn get_connector_configurations(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::ConnectorType, crate::types::ConnectorConfiguration>> {
        &self.connector_configurations
    }
    /// Appends an item to `connectors`.
    ///
    /// To override the contents of this collection use [`set_connectors`](Self::set_connectors).
    ///
    /// <p>Information about the connectors supported in Amazon AppFlow.</p>
    pub fn connectors(mut self, input: crate::types::ConnectorDetail) -> Self {
        let mut v = self.connectors.unwrap_or_default();
        v.push(input);
        self.connectors = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about the connectors supported in Amazon AppFlow.</p>
    pub fn set_connectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConnectorDetail>>) -> Self {
        self.connectors = input;
        self
    }
    /// <p>Information about the connectors supported in Amazon AppFlow.</p>
    pub fn get_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConnectorDetail>> {
        &self.connectors
    }
    /// <p>The pagination token for the next page of data.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The pagination token for the next page of data.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The pagination token for the next page of data.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeConnectorsOutput`](crate::operation::describe_connectors::DescribeConnectorsOutput).
    pub fn build(self) -> crate::operation::describe_connectors::DescribeConnectorsOutput {
        crate::operation::describe_connectors::DescribeConnectorsOutput {
            connector_configurations: self.connector_configurations,
            connectors: self.connectors,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}