aws-sdk-devopsagent 1.3.0

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

/// Input for listing registered services with optional filtering by service type.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListServicesInput {
    /// Maximum number of results to return in a single call.
    pub max_results: ::std::option::Option<i32>,
    /// Token for the next page of results.
    pub next_token: ::std::option::Option<::std::string::String>,
    /// Optional filter to list only services of a specific type.
    pub filter_service_type: ::std::option::Option<crate::types::Service>,
}
impl ListServicesInput {
    /// Maximum number of results to return in a single call.
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// Token for the next page of results.
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// Optional filter to list only services of a specific type.
    pub fn filter_service_type(&self) -> ::std::option::Option<&crate::types::Service> {
        self.filter_service_type.as_ref()
    }
}
impl ListServicesInput {
    /// Creates a new builder-style object to manufacture [`ListServicesInput`](crate::operation::list_services::ListServicesInput).
    pub fn builder() -> crate::operation::list_services::builders::ListServicesInputBuilder {
        crate::operation::list_services::builders::ListServicesInputBuilder::default()
    }
}

/// A builder for [`ListServicesInput`](crate::operation::list_services::ListServicesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListServicesInputBuilder {
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) filter_service_type: ::std::option::Option<crate::types::Service>,
}
impl ListServicesInputBuilder {
    /// Maximum number of results to return in a single call.
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// Maximum number of results to return in a single call.
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// Maximum number of results to return in a single call.
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Token for the next page 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
    }
    /// Token for the next page of results.
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Token for the next page of results.
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Optional filter to list only services of a specific type.
    pub fn filter_service_type(mut self, input: crate::types::Service) -> Self {
        self.filter_service_type = ::std::option::Option::Some(input);
        self
    }
    /// Optional filter to list only services of a specific type.
    pub fn set_filter_service_type(mut self, input: ::std::option::Option<crate::types::Service>) -> Self {
        self.filter_service_type = input;
        self
    }
    /// Optional filter to list only services of a specific type.
    pub fn get_filter_service_type(&self) -> &::std::option::Option<crate::types::Service> {
        &self.filter_service_type
    }
    /// Consumes the builder and constructs a [`ListServicesInput`](crate::operation::list_services::ListServicesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_services::ListServicesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_services::ListServicesInput {
            max_results: self.max_results,
            next_token: self.next_token,
            filter_service_type: self.filter_service_type,
        })
    }
}