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 creating a new service association within an AgentSpace.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateServiceInput {
    /// The unique identifier of the AgentSpace
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The unique identifier of the service.
    pub service_id: ::std::option::Option<::std::string::String>,
    /// The configuration that directs how AgentSpace interacts with the given service.
    pub configuration: ::std::option::Option<crate::types::ServiceConfiguration>,
}
impl AssociateServiceInput {
    /// 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 service.
    pub fn service_id(&self) -> ::std::option::Option<&str> {
        self.service_id.as_deref()
    }
    /// The configuration that directs how AgentSpace interacts with the given service.
    pub fn configuration(&self) -> ::std::option::Option<&crate::types::ServiceConfiguration> {
        self.configuration.as_ref()
    }
}
impl AssociateServiceInput {
    /// Creates a new builder-style object to manufacture [`AssociateServiceInput`](crate::operation::associate_service::AssociateServiceInput).
    pub fn builder() -> crate::operation::associate_service::builders::AssociateServiceInputBuilder {
        crate::operation::associate_service::builders::AssociateServiceInputBuilder::default()
    }
}

/// A builder for [`AssociateServiceInput`](crate::operation::associate_service::AssociateServiceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateServiceInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) service_id: ::std::option::Option<::std::string::String>,
    pub(crate) configuration: ::std::option::Option<crate::types::ServiceConfiguration>,
}
impl AssociateServiceInputBuilder {
    /// 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 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 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 service.
    pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_id
    }
    /// The configuration that directs how AgentSpace interacts with the given service.
    /// This field is required.
    pub fn configuration(mut self, input: crate::types::ServiceConfiguration) -> Self {
        self.configuration = ::std::option::Option::Some(input);
        self
    }
    /// The configuration that directs how AgentSpace interacts with the given service.
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ServiceConfiguration>) -> Self {
        self.configuration = input;
        self
    }
    /// The configuration that directs how AgentSpace interacts with the given service.
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ServiceConfiguration> {
        &self.configuration
    }
    /// Consumes the builder and constructs a [`AssociateServiceInput`](crate::operation::associate_service::AssociateServiceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::associate_service::AssociateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::associate_service::AssociateServiceInput {
            agent_space_id: self.agent_space_id,
            service_id: self.service_id,
            configuration: self.configuration,
        })
    }
}