aws-sdk-glue 1.149.0

AWS SDK for AWS Glue
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 ListTriggersInput {
    /// <p>A continuation token, if this is a continuation request.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The name of the job for which to retrieve triggers. The trigger that can start this job is returned. If there is no such trigger, all triggers are returned.</p>
    pub dependent_job_name: ::std::option::Option<::std::string::String>,
    /// <p>The maximum size of a list to return.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>Specifies to return only these tagged resources.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl ListTriggersInput {
    /// <p>A continuation token, if this is a continuation request.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The name of the job for which to retrieve triggers. The trigger that can start this job is returned. If there is no such trigger, all triggers are returned.</p>
    pub fn dependent_job_name(&self) -> ::std::option::Option<&str> {
        self.dependent_job_name.as_deref()
    }
    /// <p>The maximum size of a list to return.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>Specifies to return only these tagged resources.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ListTriggersInput {
    /// Creates a new builder-style object to manufacture [`ListTriggersInput`](crate::operation::list_triggers::ListTriggersInput).
    pub fn builder() -> crate::operation::list_triggers::builders::ListTriggersInputBuilder {
        crate::operation::list_triggers::builders::ListTriggersInputBuilder::default()
    }
}

/// A builder for [`ListTriggersInput`](crate::operation::list_triggers::ListTriggersInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListTriggersInputBuilder {
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) dependent_job_name: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl ListTriggersInputBuilder {
    /// <p>A continuation token, if this is a continuation request.</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>A continuation token, if this is a continuation request.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>A continuation token, if this is a continuation request.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The name of the job for which to retrieve triggers. The trigger that can start this job is returned. If there is no such trigger, all triggers are returned.</p>
    pub fn dependent_job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dependent_job_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the job for which to retrieve triggers. The trigger that can start this job is returned. If there is no such trigger, all triggers are returned.</p>
    pub fn set_dependent_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dependent_job_name = input;
        self
    }
    /// <p>The name of the job for which to retrieve triggers. The trigger that can start this job is returned. If there is no such trigger, all triggers are returned.</p>
    pub fn get_dependent_job_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.dependent_job_name
    }
    /// <p>The maximum size of a list to return.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum size of a list to return.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum size of a list to return.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Specifies to return only these tagged resources.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Specifies to return only these tagged resources.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Specifies to return only these tagged resources.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`ListTriggersInput`](crate::operation::list_triggers::ListTriggersInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_triggers::ListTriggersInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_triggers::ListTriggersInput {
            next_token: self.next_token,
            dependent_job_name: self.dependent_job_name,
            max_results: self.max_results,
            tags: self.tags,
        })
    }
}