aws-sdk-groundstation 1.107.0

AWS SDK for AWS Ground Station
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RegisterAgentInput {
    /// <p>Data for associating an agent with the capabilities it is managing.</p>
    pub discovery_data: ::std::option::Option<crate::types::DiscoveryData>,
    /// <p>Detailed information about the agent being registered.</p>
    pub agent_details: ::std::option::Option<crate::types::AgentDetails>,
    /// <p>Tags assigned to an <code>Agent</code>.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl RegisterAgentInput {
    /// <p>Data for associating an agent with the capabilities it is managing.</p>
    pub fn discovery_data(&self) -> ::std::option::Option<&crate::types::DiscoveryData> {
        self.discovery_data.as_ref()
    }
    /// <p>Detailed information about the agent being registered.</p>
    pub fn agent_details(&self) -> ::std::option::Option<&crate::types::AgentDetails> {
        self.agent_details.as_ref()
    }
    /// <p>Tags assigned to an <code>Agent</code>.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl RegisterAgentInput {
    /// Creates a new builder-style object to manufacture [`RegisterAgentInput`](crate::operation::register_agent::RegisterAgentInput).
    pub fn builder() -> crate::operation::register_agent::builders::RegisterAgentInputBuilder {
        crate::operation::register_agent::builders::RegisterAgentInputBuilder::default()
    }
}

/// A builder for [`RegisterAgentInput`](crate::operation::register_agent::RegisterAgentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RegisterAgentInputBuilder {
    pub(crate) discovery_data: ::std::option::Option<crate::types::DiscoveryData>,
    pub(crate) agent_details: ::std::option::Option<crate::types::AgentDetails>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl RegisterAgentInputBuilder {
    /// <p>Data for associating an agent with the capabilities it is managing.</p>
    /// This field is required.
    pub fn discovery_data(mut self, input: crate::types::DiscoveryData) -> Self {
        self.discovery_data = ::std::option::Option::Some(input);
        self
    }
    /// <p>Data for associating an agent with the capabilities it is managing.</p>
    pub fn set_discovery_data(mut self, input: ::std::option::Option<crate::types::DiscoveryData>) -> Self {
        self.discovery_data = input;
        self
    }
    /// <p>Data for associating an agent with the capabilities it is managing.</p>
    pub fn get_discovery_data(&self) -> &::std::option::Option<crate::types::DiscoveryData> {
        &self.discovery_data
    }
    /// <p>Detailed information about the agent being registered.</p>
    /// This field is required.
    pub fn agent_details(mut self, input: crate::types::AgentDetails) -> Self {
        self.agent_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Detailed information about the agent being registered.</p>
    pub fn set_agent_details(mut self, input: ::std::option::Option<crate::types::AgentDetails>) -> Self {
        self.agent_details = input;
        self
    }
    /// <p>Detailed information about the agent being registered.</p>
    pub fn get_agent_details(&self) -> &::std::option::Option<crate::types::AgentDetails> {
        &self.agent_details
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Tags assigned to an <code>Agent</code>.</p>
    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
    }
    /// <p>Tags assigned to an <code>Agent</code>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Tags assigned to an <code>Agent</code>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`RegisterAgentInput`](crate::operation::register_agent::RegisterAgentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::register_agent::RegisterAgentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::register_agent::RegisterAgentInput {
            discovery_data: self.discovery_data,
            agent_details: self.agent_details,
            tags: self.tags,
        })
    }
}