aws-sdk-auditmanager 1.102.0

AWS SDK for AWS Audit Manager
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Short for uniform resource locator. A URL is used as a unique identifier to locate a resource on the internet.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Url {
    /// <p>The name or word that's used as a hyperlink to the URL.</p>
    pub hyperlink_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier for the internet resource.</p>
    pub link: ::std::option::Option<::std::string::String>,
}
impl Url {
    /// <p>The name or word that's used as a hyperlink to the URL.</p>
    pub fn hyperlink_name(&self) -> ::std::option::Option<&str> {
        self.hyperlink_name.as_deref()
    }
    /// <p>The unique identifier for the internet resource.</p>
    pub fn link(&self) -> ::std::option::Option<&str> {
        self.link.as_deref()
    }
}
impl Url {
    /// Creates a new builder-style object to manufacture [`Url`](crate::types::Url).
    pub fn builder() -> crate::types::builders::UrlBuilder {
        crate::types::builders::UrlBuilder::default()
    }
}

/// A builder for [`Url`](crate::types::Url).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UrlBuilder {
    pub(crate) hyperlink_name: ::std::option::Option<::std::string::String>,
    pub(crate) link: ::std::option::Option<::std::string::String>,
}
impl UrlBuilder {
    /// <p>The name or word that's used as a hyperlink to the URL.</p>
    pub fn hyperlink_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hyperlink_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or word that's used as a hyperlink to the URL.</p>
    pub fn set_hyperlink_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hyperlink_name = input;
        self
    }
    /// <p>The name or word that's used as a hyperlink to the URL.</p>
    pub fn get_hyperlink_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.hyperlink_name
    }
    /// <p>The unique identifier for the internet resource.</p>
    pub fn link(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.link = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the internet resource.</p>
    pub fn set_link(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.link = input;
        self
    }
    /// <p>The unique identifier for the internet resource.</p>
    pub fn get_link(&self) -> &::std::option::Option<::std::string::String> {
        &self.link
    }
    /// Consumes the builder and constructs a [`Url`](crate::types::Url).
    pub fn build(self) -> crate::types::Url {
        crate::types::Url {
            hyperlink_name: self.hyperlink_name,
            link: self.link,
        }
    }
}