aws-sdk-devopsagent 1.4.0

AWS SDK for AWS DevOps Agent Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Request structure for listing goals
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListGoalsInput {
    /// The unique identifier for the agent space
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// Filter goals by goal status
    pub status: ::std::option::Option<crate::types::GoalStatus>,
    /// Filter goals by goal type
    pub goal_type: ::std::option::Option<crate::types::GoalType>,
    /// Maximum number of goals to return
    pub limit: ::std::option::Option<i32>,
    /// Pagination token for the next set of results
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListGoalsInput {
    /// The unique identifier for the agent space
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// Filter goals by goal status
    pub fn status(&self) -> ::std::option::Option<&crate::types::GoalStatus> {
        self.status.as_ref()
    }
    /// Filter goals by goal type
    pub fn goal_type(&self) -> ::std::option::Option<&crate::types::GoalType> {
        self.goal_type.as_ref()
    }
    /// Maximum number of goals to return
    pub fn limit(&self) -> ::std::option::Option<i32> {
        self.limit
    }
    /// Pagination token for the next set of results
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListGoalsInput {
    /// Creates a new builder-style object to manufacture [`ListGoalsInput`](crate::operation::list_goals::ListGoalsInput).
    pub fn builder() -> crate::operation::list_goals::builders::ListGoalsInputBuilder {
        crate::operation::list_goals::builders::ListGoalsInputBuilder::default()
    }
}

/// A builder for [`ListGoalsInput`](crate::operation::list_goals::ListGoalsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListGoalsInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::GoalStatus>,
    pub(crate) goal_type: ::std::option::Option<crate::types::GoalType>,
    pub(crate) limit: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListGoalsInputBuilder {
    /// The unique identifier for the agent space
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier for the agent space
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// The unique identifier for the agent space
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// Filter goals by goal status
    pub fn status(mut self, input: crate::types::GoalStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// Filter goals by goal status
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GoalStatus>) -> Self {
        self.status = input;
        self
    }
    /// Filter goals by goal status
    pub fn get_status(&self) -> &::std::option::Option<crate::types::GoalStatus> {
        &self.status
    }
    /// Filter goals by goal type
    pub fn goal_type(mut self, input: crate::types::GoalType) -> Self {
        self.goal_type = ::std::option::Option::Some(input);
        self
    }
    /// Filter goals by goal type
    pub fn set_goal_type(mut self, input: ::std::option::Option<crate::types::GoalType>) -> Self {
        self.goal_type = input;
        self
    }
    /// Filter goals by goal type
    pub fn get_goal_type(&self) -> &::std::option::Option<crate::types::GoalType> {
        &self.goal_type
    }
    /// Maximum number of goals to return
    pub fn limit(mut self, input: i32) -> Self {
        self.limit = ::std::option::Option::Some(input);
        self
    }
    /// Maximum number of goals to return
    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.limit = input;
        self
    }
    /// Maximum number of goals to return
    pub fn get_limit(&self) -> &::std::option::Option<i32> {
        &self.limit
    }
    /// Pagination token for the next set of results
    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
    }
    /// Pagination token for the next set of results
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Pagination token for the next set of results
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListGoalsInput`](crate::operation::list_goals::ListGoalsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_goals::ListGoalsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_goals::ListGoalsInput {
            agent_space_id: self.agent_space_id,
            status: self.status,
            goal_type: self.goal_type,
            limit: self.limit,
            next_token: self.next_token,
        })
    }
}