aws-sdk-rtbfabric 1.24.0

AWS SDK for RTBFabric
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 CreateLinkInput {
    /// <p>The unique identifier of the gateway.</p>
    pub gateway_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the peer gateway.</p>
    pub peer_gateway_id: ::std::option::Option<::std::string::String>,
    /// <p>Attributes of the link.</p>
    pub attributes: ::std::option::Option<crate::types::LinkAttributes>,
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub http_responder_allowed: ::std::option::Option<bool>,
    /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Settings for the application logs.</p>
    pub log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
    /// <p>The timeout value in milliseconds.</p>
    pub timeout_in_millis: ::std::option::Option<i64>,
}
impl CreateLinkInput {
    /// <p>The unique identifier of the gateway.</p>
    pub fn gateway_id(&self) -> ::std::option::Option<&str> {
        self.gateway_id.as_deref()
    }
    /// <p>The unique identifier of the peer gateway.</p>
    pub fn peer_gateway_id(&self) -> ::std::option::Option<&str> {
        self.peer_gateway_id.as_deref()
    }
    /// <p>Attributes of the link.</p>
    pub fn attributes(&self) -> ::std::option::Option<&crate::types::LinkAttributes> {
        self.attributes.as_ref()
    }
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub fn http_responder_allowed(&self) -> ::std::option::Option<bool> {
        self.http_responder_allowed
    }
    /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>Settings for the application logs.</p>
    pub fn log_settings(&self) -> ::std::option::Option<&crate::types::LinkLogSettings> {
        self.log_settings.as_ref()
    }
    /// <p>The timeout value in milliseconds.</p>
    pub fn timeout_in_millis(&self) -> ::std::option::Option<i64> {
        self.timeout_in_millis
    }
}
impl CreateLinkInput {
    /// Creates a new builder-style object to manufacture [`CreateLinkInput`](crate::operation::create_link::CreateLinkInput).
    pub fn builder() -> crate::operation::create_link::builders::CreateLinkInputBuilder {
        crate::operation::create_link::builders::CreateLinkInputBuilder::default()
    }
}

/// A builder for [`CreateLinkInput`](crate::operation::create_link::CreateLinkInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateLinkInputBuilder {
    pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
    pub(crate) peer_gateway_id: ::std::option::Option<::std::string::String>,
    pub(crate) attributes: ::std::option::Option<crate::types::LinkAttributes>,
    pub(crate) http_responder_allowed: ::std::option::Option<bool>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
    pub(crate) timeout_in_millis: ::std::option::Option<i64>,
}
impl CreateLinkInputBuilder {
    /// <p>The unique identifier of the gateway.</p>
    /// This field is required.
    pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.gateway_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.gateway_id = input;
        self
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.gateway_id
    }
    /// <p>The unique identifier of the peer gateway.</p>
    /// This field is required.
    pub fn peer_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.peer_gateway_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the peer gateway.</p>
    pub fn set_peer_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.peer_gateway_id = input;
        self
    }
    /// <p>The unique identifier of the peer gateway.</p>
    pub fn get_peer_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.peer_gateway_id
    }
    /// <p>Attributes of the link.</p>
    pub fn attributes(mut self, input: crate::types::LinkAttributes) -> Self {
        self.attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Attributes of the link.</p>
    pub fn set_attributes(mut self, input: ::std::option::Option<crate::types::LinkAttributes>) -> Self {
        self.attributes = input;
        self
    }
    /// <p>Attributes of the link.</p>
    pub fn get_attributes(&self) -> &::std::option::Option<crate::types::LinkAttributes> {
        &self.attributes
    }
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub fn http_responder_allowed(mut self, input: bool) -> Self {
        self.http_responder_allowed = ::std::option::Option::Some(input);
        self
    }
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub fn set_http_responder_allowed(mut self, input: ::std::option::Option<bool>) -> Self {
        self.http_responder_allowed = input;
        self
    }
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub fn get_http_responder_allowed(&self) -> &::std::option::Option<bool> {
        &self.http_responder_allowed
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</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>A map of the key-value pairs of the tag or tags to assign to the resource.</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>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>Settings for the application logs.</p>
    /// This field is required.
    pub fn log_settings(mut self, input: crate::types::LinkLogSettings) -> Self {
        self.log_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>Settings for the application logs.</p>
    pub fn set_log_settings(mut self, input: ::std::option::Option<crate::types::LinkLogSettings>) -> Self {
        self.log_settings = input;
        self
    }
    /// <p>Settings for the application logs.</p>
    pub fn get_log_settings(&self) -> &::std::option::Option<crate::types::LinkLogSettings> {
        &self.log_settings
    }
    /// <p>The timeout value in milliseconds.</p>
    pub fn timeout_in_millis(mut self, input: i64) -> Self {
        self.timeout_in_millis = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timeout value in milliseconds.</p>
    pub fn set_timeout_in_millis(mut self, input: ::std::option::Option<i64>) -> Self {
        self.timeout_in_millis = input;
        self
    }
    /// <p>The timeout value in milliseconds.</p>
    pub fn get_timeout_in_millis(&self) -> &::std::option::Option<i64> {
        &self.timeout_in_millis
    }
    /// Consumes the builder and constructs a [`CreateLinkInput`](crate::operation::create_link::CreateLinkInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_link::CreateLinkInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_link::CreateLinkInput {
            gateway_id: self.gateway_id,
            peer_gateway_id: self.peer_gateway_id,
            attributes: self.attributes,
            http_responder_allowed: self.http_responder_allowed,
            tags: self.tags,
            log_settings: self.log_settings,
            timeout_in_millis: self.timeout_in_millis,
        })
    }
}