aws-sdk-networkmanager 1.102.0

AWS SDK for AWS Network Manager
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 UpdateConnectionInput {
    /// <p>The ID of the global network.</p>
    pub global_network_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the connection.</p>
    pub connection_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the link for the first device in the connection.</p>
    pub link_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the link for the second device in the connection.</p>
    pub connected_link_id: ::std::option::Option<::std::string::String>,
    /// <p>A description of the connection.</p>
    /// <p>Length Constraints: Maximum length of 256 characters.</p>
    pub description: ::std::option::Option<::std::string::String>,
}
impl UpdateConnectionInput {
    /// <p>The ID of the global network.</p>
    pub fn global_network_id(&self) -> ::std::option::Option<&str> {
        self.global_network_id.as_deref()
    }
    /// <p>The ID of the connection.</p>
    pub fn connection_id(&self) -> ::std::option::Option<&str> {
        self.connection_id.as_deref()
    }
    /// <p>The ID of the link for the first device in the connection.</p>
    pub fn link_id(&self) -> ::std::option::Option<&str> {
        self.link_id.as_deref()
    }
    /// <p>The ID of the link for the second device in the connection.</p>
    pub fn connected_link_id(&self) -> ::std::option::Option<&str> {
        self.connected_link_id.as_deref()
    }
    /// <p>A description of the connection.</p>
    /// <p>Length Constraints: Maximum length of 256 characters.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl UpdateConnectionInput {
    /// Creates a new builder-style object to manufacture [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
    pub fn builder() -> crate::operation::update_connection::builders::UpdateConnectionInputBuilder {
        crate::operation::update_connection::builders::UpdateConnectionInputBuilder::default()
    }
}

/// A builder for [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateConnectionInputBuilder {
    pub(crate) global_network_id: ::std::option::Option<::std::string::String>,
    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
    pub(crate) link_id: ::std::option::Option<::std::string::String>,
    pub(crate) connected_link_id: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl UpdateConnectionInputBuilder {
    /// <p>The ID of the global network.</p>
    /// This field is required.
    pub fn global_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.global_network_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the global network.</p>
    pub fn set_global_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.global_network_id = input;
        self
    }
    /// <p>The ID of the global network.</p>
    pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.global_network_id
    }
    /// <p>The ID of the connection.</p>
    /// This field is required.
    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the connection.</p>
    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_id = input;
        self
    }
    /// <p>The ID of the connection.</p>
    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_id
    }
    /// <p>The ID of the link for the first device in the connection.</p>
    pub fn link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.link_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the link for the first device in the connection.</p>
    pub fn set_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.link_id = input;
        self
    }
    /// <p>The ID of the link for the first device in the connection.</p>
    pub fn get_link_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.link_id
    }
    /// <p>The ID of the link for the second device in the connection.</p>
    pub fn connected_link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connected_link_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the link for the second device in the connection.</p>
    pub fn set_connected_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connected_link_id = input;
        self
    }
    /// <p>The ID of the link for the second device in the connection.</p>
    pub fn get_connected_link_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connected_link_id
    }
    /// <p>A description of the connection.</p>
    /// <p>Length Constraints: Maximum length of 256 characters.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the connection.</p>
    /// <p>Length Constraints: Maximum length of 256 characters.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the connection.</p>
    /// <p>Length Constraints: Maximum length of 256 characters.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_connection::UpdateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_connection::UpdateConnectionInput {
            global_network_id: self.global_network_id,
            connection_id: self.connection_id,
            link_id: self.link_id,
            connected_link_id: self.connected_link_id,
            description: self.description,
        })
    }
}