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.

/// Input for retrieving a specific service association.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetServiceInput {
    /// The unique identifier of the given service.
    pub service_id: ::std::option::Option<::std::string::String>,
}
impl GetServiceInput {
    /// The unique identifier of the given service.
    pub fn service_id(&self) -> ::std::option::Option<&str> {
        self.service_id.as_deref()
    }
}
impl GetServiceInput {
    /// Creates a new builder-style object to manufacture [`GetServiceInput`](crate::operation::get_service::GetServiceInput).
    pub fn builder() -> crate::operation::get_service::builders::GetServiceInputBuilder {
        crate::operation::get_service::builders::GetServiceInputBuilder::default()
    }
}

/// A builder for [`GetServiceInput`](crate::operation::get_service::GetServiceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetServiceInputBuilder {
    pub(crate) service_id: ::std::option::Option<::std::string::String>,
}
impl GetServiceInputBuilder {
    /// The unique identifier of the given service.
    /// This field is required.
    pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier of the given service.
    pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_id = input;
        self
    }
    /// The unique identifier of the given service.
    pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_id
    }
    /// Consumes the builder and constructs a [`GetServiceInput`](crate::operation::get_service::GetServiceInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_service::GetServiceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_service::GetServiceInput { service_id: self.service_id })
    }
}