aws-sdk-resourcegroups 1.23.0

AWS SDK for AWS Resource Groups
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 UpdateGroupQueryInput {
    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
    #[deprecated(note = "This field is deprecated, use Group instead.")]
    pub group_name: ::std::option::Option<::std::string::String>,
    /// <p>The name or the ARN of the resource group to query.</p>
    pub group: ::std::option::Option<::std::string::String>,
    /// <p>The resource query to determine which Amazon Web Services resources are members of this resource group.</p><note>
    /// <p>A resource group can contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but not both.</p>
    /// </note>
    pub resource_query: ::std::option::Option<crate::types::ResourceQuery>,
}
impl UpdateGroupQueryInput {
    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
    #[deprecated(note = "This field is deprecated, use Group instead.")]
    pub fn group_name(&self) -> ::std::option::Option<&str> {
        self.group_name.as_deref()
    }
    /// <p>The name or the ARN of the resource group to query.</p>
    pub fn group(&self) -> ::std::option::Option<&str> {
        self.group.as_deref()
    }
    /// <p>The resource query to determine which Amazon Web Services resources are members of this resource group.</p><note>
    /// <p>A resource group can contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but not both.</p>
    /// </note>
    pub fn resource_query(&self) -> ::std::option::Option<&crate::types::ResourceQuery> {
        self.resource_query.as_ref()
    }
}
impl UpdateGroupQueryInput {
    /// Creates a new builder-style object to manufacture [`UpdateGroupQueryInput`](crate::operation::update_group_query::UpdateGroupQueryInput).
    pub fn builder() -> crate::operation::update_group_query::builders::UpdateGroupQueryInputBuilder {
        crate::operation::update_group_query::builders::UpdateGroupQueryInputBuilder::default()
    }
}

/// A builder for [`UpdateGroupQueryInput`](crate::operation::update_group_query::UpdateGroupQueryInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateGroupQueryInputBuilder {
    pub(crate) group_name: ::std::option::Option<::std::string::String>,
    pub(crate) group: ::std::option::Option<::std::string::String>,
    pub(crate) resource_query: ::std::option::Option<crate::types::ResourceQuery>,
}
impl UpdateGroupQueryInputBuilder {
    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
    #[deprecated(note = "This field is deprecated, use Group instead.")]
    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
    #[deprecated(note = "This field is deprecated, use Group instead.")]
    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group_name = input;
        self
    }
    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
    #[deprecated(note = "This field is deprecated, use Group instead.")]
    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_name
    }
    /// <p>The name or the ARN of the resource group to query.</p>
    pub fn group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or the ARN of the resource group to query.</p>
    pub fn set_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group = input;
        self
    }
    /// <p>The name or the ARN of the resource group to query.</p>
    pub fn get_group(&self) -> &::std::option::Option<::std::string::String> {
        &self.group
    }
    /// <p>The resource query to determine which Amazon Web Services resources are members of this resource group.</p><note>
    /// <p>A resource group can contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but not both.</p>
    /// </note>
    /// This field is required.
    pub fn resource_query(mut self, input: crate::types::ResourceQuery) -> Self {
        self.resource_query = ::std::option::Option::Some(input);
        self
    }
    /// <p>The resource query to determine which Amazon Web Services resources are members of this resource group.</p><note>
    /// <p>A resource group can contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but not both.</p>
    /// </note>
    pub fn set_resource_query(mut self, input: ::std::option::Option<crate::types::ResourceQuery>) -> Self {
        self.resource_query = input;
        self
    }
    /// <p>The resource query to determine which Amazon Web Services resources are members of this resource group.</p><note>
    /// <p>A resource group can contain either a <code>Configuration</code> or a <code>ResourceQuery</code>, but not both.</p>
    /// </note>
    pub fn get_resource_query(&self) -> &::std::option::Option<crate::types::ResourceQuery> {
        &self.resource_query
    }
    /// Consumes the builder and constructs a [`UpdateGroupQueryInput`](crate::operation::update_group_query::UpdateGroupQueryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_group_query::UpdateGroupQueryInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_group_query::UpdateGroupQueryInput {
            group_name: self.group_name,
            group: self.group,
            resource_query: self.resource_query,
        })
    }
}