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.

/// Output containing the newly created AgentSpace.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateAgentSpaceOutput {
    /// Represents a complete AgentSpace with all its properties, timestamps, encryption settings, and unique identifier.
    pub agent_space: ::std::option::Option<crate::types::AgentSpace>,
    /// Tags associated with the created AgentSpace.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl CreateAgentSpaceOutput {
    /// Represents a complete AgentSpace with all its properties, timestamps, encryption settings, and unique identifier.
    pub fn agent_space(&self) -> ::std::option::Option<&crate::types::AgentSpace> {
        self.agent_space.as_ref()
    }
    /// Tags associated with the created AgentSpace.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for CreateAgentSpaceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateAgentSpaceOutput {
    /// Creates a new builder-style object to manufacture [`CreateAgentSpaceOutput`](crate::operation::create_agent_space::CreateAgentSpaceOutput).
    pub fn builder() -> crate::operation::create_agent_space::builders::CreateAgentSpaceOutputBuilder {
        crate::operation::create_agent_space::builders::CreateAgentSpaceOutputBuilder::default()
    }
}

/// A builder for [`CreateAgentSpaceOutput`](crate::operation::create_agent_space::CreateAgentSpaceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateAgentSpaceOutputBuilder {
    pub(crate) agent_space: ::std::option::Option<crate::types::AgentSpace>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl CreateAgentSpaceOutputBuilder {
    /// Represents a complete AgentSpace with all its properties, timestamps, encryption settings, and unique identifier.
    /// This field is required.
    pub fn agent_space(mut self, input: crate::types::AgentSpace) -> Self {
        self.agent_space = ::std::option::Option::Some(input);
        self
    }
    /// Represents a complete AgentSpace with all its properties, timestamps, encryption settings, and unique identifier.
    pub fn set_agent_space(mut self, input: ::std::option::Option<crate::types::AgentSpace>) -> Self {
        self.agent_space = input;
        self
    }
    /// Represents a complete AgentSpace with all its properties, timestamps, encryption settings, and unique identifier.
    pub fn get_agent_space(&self) -> &::std::option::Option<crate::types::AgentSpace> {
        &self.agent_space
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// Tags associated with the created AgentSpace.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// Tags associated with the created AgentSpace.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// Tags associated with the created AgentSpace.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateAgentSpaceOutput`](crate::operation::create_agent_space::CreateAgentSpaceOutput).
    pub fn build(self) -> crate::operation::create_agent_space::CreateAgentSpaceOutput {
        crate::operation::create_agent_space::CreateAgentSpaceOutput {
            agent_space: self.agent_space,
            tags: self.tags,
            _request_id: self._request_id,
        }
    }
}