aws-sdk-rtbfabric 1.26.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 DeleteLinkOutput {
    /// <p>The unique identifier of the link.</p>
    pub link_id: ::std::string::String,
    /// <p>The status of the link.</p>
    pub status: crate::types::LinkStatus,
    _request_id: Option<String>,
}
impl DeleteLinkOutput {
    /// <p>The unique identifier of the link.</p>
    pub fn link_id(&self) -> &str {
        use std::ops::Deref;
        self.link_id.deref()
    }
    /// <p>The status of the link.</p>
    pub fn status(&self) -> &crate::types::LinkStatus {
        &self.status
    }
}
impl ::aws_types::request_id::RequestId for DeleteLinkOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DeleteLinkOutput {
    /// Creates a new builder-style object to manufacture [`DeleteLinkOutput`](crate::operation::delete_link::DeleteLinkOutput).
    pub fn builder() -> crate::operation::delete_link::builders::DeleteLinkOutputBuilder {
        crate::operation::delete_link::builders::DeleteLinkOutputBuilder::default()
    }
}

/// A builder for [`DeleteLinkOutput`](crate::operation::delete_link::DeleteLinkOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteLinkOutputBuilder {
    pub(crate) link_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::LinkStatus>,
    _request_id: Option<String>,
}
impl DeleteLinkOutputBuilder {
    /// <p>The unique identifier of the link.</p>
    /// This field is required.
    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 unique identifier of the link.</p>
    pub fn set_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.link_id = input;
        self
    }
    /// <p>The unique identifier of the link.</p>
    pub fn get_link_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.link_id
    }
    /// <p>The status of the link.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::LinkStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the link.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::LinkStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the link.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::LinkStatus> {
        &self.status
    }
    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 [`DeleteLinkOutput`](crate::operation::delete_link::DeleteLinkOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`link_id`](crate::operation::delete_link::builders::DeleteLinkOutputBuilder::link_id)
    /// - [`status`](crate::operation::delete_link::builders::DeleteLinkOutputBuilder::status)
    pub fn build(self) -> ::std::result::Result<crate::operation::delete_link::DeleteLinkOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_link::DeleteLinkOutput {
            link_id: self.link_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "link_id",
                    "link_id was not specified but it is required when building DeleteLinkOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building DeleteLinkOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}