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 removing a service association from an AgentSpace.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DisassociateServiceInput {
    /// The unique identifier of the AgentSpace
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The unique identifier of the given association.
    pub association_id: ::std::option::Option<::std::string::String>,
}
impl DisassociateServiceInput {
    /// The unique identifier of the AgentSpace
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// The unique identifier of the given association.
    pub fn association_id(&self) -> ::std::option::Option<&str> {
        self.association_id.as_deref()
    }
}
impl DisassociateServiceInput {
    /// Creates a new builder-style object to manufacture [`DisassociateServiceInput`](crate::operation::disassociate_service::DisassociateServiceInput).
    pub fn builder() -> crate::operation::disassociate_service::builders::DisassociateServiceInputBuilder {
        crate::operation::disassociate_service::builders::DisassociateServiceInputBuilder::default()
    }
}

/// A builder for [`DisassociateServiceInput`](crate::operation::disassociate_service::DisassociateServiceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateServiceInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) association_id: ::std::option::Option<::std::string::String>,
}
impl DisassociateServiceInputBuilder {
    /// The unique identifier of the AgentSpace
    /// 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 of the AgentSpace
    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 of the AgentSpace
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// The unique identifier of the given association.
    /// This field is required.
    pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.association_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier of the given association.
    pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.association_id = input;
        self
    }
    /// The unique identifier of the given association.
    pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.association_id
    }
    /// Consumes the builder and constructs a [`DisassociateServiceInput`](crate::operation::disassociate_service::DisassociateServiceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::disassociate_service::DisassociateServiceInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::disassociate_service::DisassociateServiceInput {
            agent_space_id: self.agent_space_id,
            association_id: self.association_id,
        })
    }
}