aws-sdk-config 1.116.0

AWS SDK for AWS Config
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 PutConnectorInput {
    /// <p>The provider-specific configuration for connecting to the third-party cloud service provider.</p>
    pub connector_configuration: ::std::option::Option<crate::types::ConnectorConfiguration>,
    /// <p>The tags for the connector. Each tag consists of a key and an optional value, both of which you define.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl PutConnectorInput {
    /// <p>The provider-specific configuration for connecting to the third-party cloud service provider.</p>
    pub fn connector_configuration(&self) -> ::std::option::Option<&crate::types::ConnectorConfiguration> {
        self.connector_configuration.as_ref()
    }
    /// <p>The tags for the connector. Each tag consists of a key and an optional value, both of which you define.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl PutConnectorInput {
    /// Creates a new builder-style object to manufacture [`PutConnectorInput`](crate::operation::put_connector::PutConnectorInput).
    pub fn builder() -> crate::operation::put_connector::builders::PutConnectorInputBuilder {
        crate::operation::put_connector::builders::PutConnectorInputBuilder::default()
    }
}

/// A builder for [`PutConnectorInput`](crate::operation::put_connector::PutConnectorInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutConnectorInputBuilder {
    pub(crate) connector_configuration: ::std::option::Option<crate::types::ConnectorConfiguration>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl PutConnectorInputBuilder {
    /// <p>The provider-specific configuration for connecting to the third-party cloud service provider.</p>
    /// This field is required.
    pub fn connector_configuration(mut self, input: crate::types::ConnectorConfiguration) -> Self {
        self.connector_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The provider-specific configuration for connecting to the third-party cloud service provider.</p>
    pub fn set_connector_configuration(mut self, input: ::std::option::Option<crate::types::ConnectorConfiguration>) -> Self {
        self.connector_configuration = input;
        self
    }
    /// <p>The provider-specific configuration for connecting to the third-party cloud service provider.</p>
    pub fn get_connector_configuration(&self) -> &::std::option::Option<crate::types::ConnectorConfiguration> {
        &self.connector_configuration
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags for the connector. Each tag consists of a key and an optional value, both of which you define.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The tags for the connector. Each tag consists of a key and an optional value, both of which you define.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags for the connector. Each tag consists of a key and an optional value, both of which you define.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`PutConnectorInput`](crate::operation::put_connector::PutConnectorInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::put_connector::PutConnectorInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_connector::PutConnectorInput {
            connector_configuration: self.connector_configuration,
            tags: self.tags,
        })
    }
}