aws-sdk-datazone 1.137.0

AWS SDK for Amazon DataZone
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)]
pub struct UpdateDataSourceInput {
    /// <p>The identifier of the domain in which to update a data source.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the data source to be updated.</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub enable_setting: ::std::option::Option<crate::types::EnableSetting>,
    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub publish_on_import: ::std::option::Option<bool>,
    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub asset_forms_input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>,
    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub schedule: ::std::option::Option<crate::types::ScheduleConfiguration>,
    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub configuration: ::std::option::Option<crate::types::DataSourceConfigurationInput>,
    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub recommendation: ::std::option::Option<crate::types::RecommendationConfiguration>,
    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
    pub retain_permissions_on_revoke_failure: ::std::option::Option<bool>,
}
impl UpdateDataSourceInput {
    /// <p>The identifier of the domain in which to update a data source.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The identifier of the data source to be updated.</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn enable_setting(&self) -> ::std::option::Option<&crate::types::EnableSetting> {
        self.enable_setting.as_ref()
    }
    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn publish_on_import(&self) -> ::std::option::Option<bool> {
        self.publish_on_import
    }
    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</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 `.asset_forms_input.is_none()`.
    pub fn asset_forms_input(&self) -> &[crate::types::FormInput] {
        self.asset_forms_input.as_deref().unwrap_or_default()
    }
    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn schedule(&self) -> ::std::option::Option<&crate::types::ScheduleConfiguration> {
        self.schedule.as_ref()
    }
    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn configuration(&self) -> ::std::option::Option<&crate::types::DataSourceConfigurationInput> {
        self.configuration.as_ref()
    }
    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn recommendation(&self) -> ::std::option::Option<&crate::types::RecommendationConfiguration> {
        self.recommendation.as_ref()
    }
    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
    pub fn retain_permissions_on_revoke_failure(&self) -> ::std::option::Option<bool> {
        self.retain_permissions_on_revoke_failure
    }
}
impl ::std::fmt::Debug for UpdateDataSourceInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateDataSourceInput");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("enable_setting", &self.enable_setting);
        formatter.field("publish_on_import", &self.publish_on_import);
        formatter.field("asset_forms_input", &"*** Sensitive Data Redacted ***");
        formatter.field("schedule", &"*** Sensitive Data Redacted ***");
        formatter.field("configuration", &self.configuration);
        formatter.field("recommendation", &self.recommendation);
        formatter.field("retain_permissions_on_revoke_failure", &self.retain_permissions_on_revoke_failure);
        formatter.finish()
    }
}
impl UpdateDataSourceInput {
    /// Creates a new builder-style object to manufacture [`UpdateDataSourceInput`](crate::operation::update_data_source::UpdateDataSourceInput).
    pub fn builder() -> crate::operation::update_data_source::builders::UpdateDataSourceInputBuilder {
        crate::operation::update_data_source::builders::UpdateDataSourceInputBuilder::default()
    }
}

/// A builder for [`UpdateDataSourceInput`](crate::operation::update_data_source::UpdateDataSourceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateDataSourceInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) identifier: ::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) enable_setting: ::std::option::Option<crate::types::EnableSetting>,
    pub(crate) publish_on_import: ::std::option::Option<bool>,
    pub(crate) asset_forms_input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>,
    pub(crate) schedule: ::std::option::Option<crate::types::ScheduleConfiguration>,
    pub(crate) configuration: ::std::option::Option<crate::types::DataSourceConfigurationInput>,
    pub(crate) recommendation: ::std::option::Option<crate::types::RecommendationConfiguration>,
    pub(crate) retain_permissions_on_revoke_failure: ::std::option::Option<bool>,
}
impl UpdateDataSourceInputBuilder {
    /// <p>The identifier of the domain in which to update a data source.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the domain in which to update a data source.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The identifier of the domain in which to update a data source.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The identifier of the data source to be updated.</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the data source to be updated.</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The identifier of the data source to be updated.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
    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 to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</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 to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn enable_setting(mut self, input: crate::types::EnableSetting) -> Self {
        self.enable_setting = ::std::option::Option::Some(input);
        self
    }
    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn set_enable_setting(mut self, input: ::std::option::Option<crate::types::EnableSetting>) -> Self {
        self.enable_setting = input;
        self
    }
    /// <p>The enable setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn get_enable_setting(&self) -> &::std::option::Option<crate::types::EnableSetting> {
        &self.enable_setting
    }
    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn publish_on_import(mut self, input: bool) -> Self {
        self.publish_on_import = ::std::option::Option::Some(input);
        self
    }
    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn set_publish_on_import(mut self, input: ::std::option::Option<bool>) -> Self {
        self.publish_on_import = input;
        self
    }
    /// <p>The publish on import setting to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn get_publish_on_import(&self) -> &::std::option::Option<bool> {
        &self.publish_on_import
    }
    /// Appends an item to `asset_forms_input`.
    ///
    /// To override the contents of this collection use [`set_asset_forms_input`](Self::set_asset_forms_input).
    ///
    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn asset_forms_input(mut self, input: crate::types::FormInput) -> Self {
        let mut v = self.asset_forms_input.unwrap_or_default();
        v.push(input);
        self.asset_forms_input = ::std::option::Option::Some(v);
        self
    }
    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn set_asset_forms_input(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>) -> Self {
        self.asset_forms_input = input;
        self
    }
    /// <p>The asset forms to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn get_asset_forms_input(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormInput>> {
        &self.asset_forms_input
    }
    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn schedule(mut self, input: crate::types::ScheduleConfiguration) -> Self {
        self.schedule = ::std::option::Option::Some(input);
        self
    }
    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::ScheduleConfiguration>) -> Self {
        self.schedule = input;
        self
    }
    /// <p>The schedule to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn get_schedule(&self) -> &::std::option::Option<crate::types::ScheduleConfiguration> {
        &self.schedule
    }
    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn configuration(mut self, input: crate::types::DataSourceConfigurationInput) -> Self {
        self.configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::DataSourceConfigurationInput>) -> Self {
        self.configuration = input;
        self
    }
    /// <p>The configuration to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::DataSourceConfigurationInput> {
        &self.configuration
    }
    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn recommendation(mut self, input: crate::types::RecommendationConfiguration) -> Self {
        self.recommendation = ::std::option::Option::Some(input);
        self
    }
    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn set_recommendation(mut self, input: ::std::option::Option<crate::types::RecommendationConfiguration>) -> Self {
        self.recommendation = input;
        self
    }
    /// <p>The recommendation to be updated as part of the <code>UpdateDataSource</code> action.</p>
    pub fn get_recommendation(&self) -> &::std::option::Option<crate::types::RecommendationConfiguration> {
        &self.recommendation
    }
    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
    pub fn retain_permissions_on_revoke_failure(mut self, input: bool) -> Self {
        self.retain_permissions_on_revoke_failure = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
    pub fn set_retain_permissions_on_revoke_failure(mut self, input: ::std::option::Option<bool>) -> Self {
        self.retain_permissions_on_revoke_failure = input;
        self
    }
    /// <p>Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.</p>
    pub fn get_retain_permissions_on_revoke_failure(&self) -> &::std::option::Option<bool> {
        &self.retain_permissions_on_revoke_failure
    }
    /// Consumes the builder and constructs a [`UpdateDataSourceInput`](crate::operation::update_data_source::UpdateDataSourceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_data_source::UpdateDataSourceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_data_source::UpdateDataSourceInput {
            domain_identifier: self.domain_identifier,
            identifier: self.identifier,
            name: self.name,
            description: self.description,
            enable_setting: self.enable_setting,
            publish_on_import: self.publish_on_import,
            asset_forms_input: self.asset_forms_input,
            schedule: self.schedule,
            configuration: self.configuration,
            recommendation: self.recommendation,
            retain_permissions_on_revoke_failure: self.retain_permissions_on_revoke_failure,
        })
    }
}
impl ::std::fmt::Debug for UpdateDataSourceInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateDataSourceInputBuilder");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("enable_setting", &self.enable_setting);
        formatter.field("publish_on_import", &self.publish_on_import);
        formatter.field("asset_forms_input", &"*** Sensitive Data Redacted ***");
        formatter.field("schedule", &"*** Sensitive Data Redacted ***");
        formatter.field("configuration", &self.configuration);
        formatter.field("recommendation", &self.recommendation);
        formatter.field("retain_permissions_on_revoke_failure", &self.retain_permissions_on_revoke_failure);
        formatter.finish()
    }
}