aws-sdk-networkflowmonitor 1.52.0

AWS SDK for Network Flow Monitor
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 UpdateScopeInput {
    /// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
    pub scope_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of resources to add to a scope.</p>
    pub resources_to_add: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>,
    /// <p>A list of resources to delete from a scope.</p>
    pub resources_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>,
}
impl UpdateScopeInput {
    /// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
    pub fn scope_id(&self) -> ::std::option::Option<&str> {
        self.scope_id.as_deref()
    }
    /// <p>A list of resources to add to a scope.</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 `.resources_to_add.is_none()`.
    pub fn resources_to_add(&self) -> &[crate::types::TargetResource] {
        self.resources_to_add.as_deref().unwrap_or_default()
    }
    /// <p>A list of resources to delete from a scope.</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 `.resources_to_delete.is_none()`.
    pub fn resources_to_delete(&self) -> &[crate::types::TargetResource] {
        self.resources_to_delete.as_deref().unwrap_or_default()
    }
}
impl UpdateScopeInput {
    /// Creates a new builder-style object to manufacture [`UpdateScopeInput`](crate::operation::update_scope::UpdateScopeInput).
    pub fn builder() -> crate::operation::update_scope::builders::UpdateScopeInputBuilder {
        crate::operation::update_scope::builders::UpdateScopeInputBuilder::default()
    }
}

/// A builder for [`UpdateScopeInput`](crate::operation::update_scope::UpdateScopeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateScopeInputBuilder {
    pub(crate) scope_id: ::std::option::Option<::std::string::String>,
    pub(crate) resources_to_add: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>,
    pub(crate) resources_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>,
}
impl UpdateScopeInputBuilder {
    /// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
    /// This field is required.
    pub fn scope_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.scope_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
    pub fn set_scope_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.scope_id = input;
        self
    }
    /// <p>The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.</p>
    pub fn get_scope_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.scope_id
    }
    /// Appends an item to `resources_to_add`.
    ///
    /// To override the contents of this collection use [`set_resources_to_add`](Self::set_resources_to_add).
    ///
    /// <p>A list of resources to add to a scope.</p>
    pub fn resources_to_add(mut self, input: crate::types::TargetResource) -> Self {
        let mut v = self.resources_to_add.unwrap_or_default();
        v.push(input);
        self.resources_to_add = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of resources to add to a scope.</p>
    pub fn set_resources_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>) -> Self {
        self.resources_to_add = input;
        self
    }
    /// <p>A list of resources to add to a scope.</p>
    pub fn get_resources_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetResource>> {
        &self.resources_to_add
    }
    /// Appends an item to `resources_to_delete`.
    ///
    /// To override the contents of this collection use [`set_resources_to_delete`](Self::set_resources_to_delete).
    ///
    /// <p>A list of resources to delete from a scope.</p>
    pub fn resources_to_delete(mut self, input: crate::types::TargetResource) -> Self {
        let mut v = self.resources_to_delete.unwrap_or_default();
        v.push(input);
        self.resources_to_delete = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of resources to delete from a scope.</p>
    pub fn set_resources_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetResource>>) -> Self {
        self.resources_to_delete = input;
        self
    }
    /// <p>A list of resources to delete from a scope.</p>
    pub fn get_resources_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetResource>> {
        &self.resources_to_delete
    }
    /// Consumes the builder and constructs a [`UpdateScopeInput`](crate::operation::update_scope::UpdateScopeInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_scope::UpdateScopeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_scope::UpdateScopeInput {
            scope_id: self.scope_id,
            resources_to_add: self.resources_to_add,
            resources_to_delete: self.resources_to_delete,
        })
    }
}