aws-sdk-codeconnections 1.83.0

AWS SDK for AWS CodeConnections
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 UpdateSyncBlockerOutput {
    /// <p>The resource name for the sync blocker.</p>
    pub resource_name: ::std::string::String,
    /// <p>The parent resource name for the sync blocker.</p>
    pub parent_resource_name: ::std::option::Option<::std::string::String>,
    /// <p>Information about the sync blocker to be updated.</p>
    pub sync_blocker: ::std::option::Option<crate::types::SyncBlocker>,
    _request_id: Option<String>,
}
impl UpdateSyncBlockerOutput {
    /// <p>The resource name for the sync blocker.</p>
    pub fn resource_name(&self) -> &str {
        use std::ops::Deref;
        self.resource_name.deref()
    }
    /// <p>The parent resource name for the sync blocker.</p>
    pub fn parent_resource_name(&self) -> ::std::option::Option<&str> {
        self.parent_resource_name.as_deref()
    }
    /// <p>Information about the sync blocker to be updated.</p>
    pub fn sync_blocker(&self) -> ::std::option::Option<&crate::types::SyncBlocker> {
        self.sync_blocker.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateSyncBlockerOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateSyncBlockerOutput {
    /// Creates a new builder-style object to manufacture [`UpdateSyncBlockerOutput`](crate::operation::update_sync_blocker::UpdateSyncBlockerOutput).
    pub fn builder() -> crate::operation::update_sync_blocker::builders::UpdateSyncBlockerOutputBuilder {
        crate::operation::update_sync_blocker::builders::UpdateSyncBlockerOutputBuilder::default()
    }
}

/// A builder for [`UpdateSyncBlockerOutput`](crate::operation::update_sync_blocker::UpdateSyncBlockerOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSyncBlockerOutputBuilder {
    pub(crate) resource_name: ::std::option::Option<::std::string::String>,
    pub(crate) parent_resource_name: ::std::option::Option<::std::string::String>,
    pub(crate) sync_blocker: ::std::option::Option<crate::types::SyncBlocker>,
    _request_id: Option<String>,
}
impl UpdateSyncBlockerOutputBuilder {
    /// <p>The resource name for the sync blocker.</p>
    /// This field is required.
    pub fn resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The resource name for the sync blocker.</p>
    pub fn set_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_name = input;
        self
    }
    /// <p>The resource name for the sync blocker.</p>
    pub fn get_resource_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_name
    }
    /// <p>The parent resource name for the sync blocker.</p>
    pub fn parent_resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.parent_resource_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The parent resource name for the sync blocker.</p>
    pub fn set_parent_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.parent_resource_name = input;
        self
    }
    /// <p>The parent resource name for the sync blocker.</p>
    pub fn get_parent_resource_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.parent_resource_name
    }
    /// <p>Information about the sync blocker to be updated.</p>
    /// This field is required.
    pub fn sync_blocker(mut self, input: crate::types::SyncBlocker) -> Self {
        self.sync_blocker = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the sync blocker to be updated.</p>
    pub fn set_sync_blocker(mut self, input: ::std::option::Option<crate::types::SyncBlocker>) -> Self {
        self.sync_blocker = input;
        self
    }
    /// <p>Information about the sync blocker to be updated.</p>
    pub fn get_sync_blocker(&self) -> &::std::option::Option<crate::types::SyncBlocker> {
        &self.sync_blocker
    }
    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 [`UpdateSyncBlockerOutput`](crate::operation::update_sync_blocker::UpdateSyncBlockerOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`resource_name`](crate::operation::update_sync_blocker::builders::UpdateSyncBlockerOutputBuilder::resource_name)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_sync_blocker::UpdateSyncBlockerOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_sync_blocker::UpdateSyncBlockerOutput {
            resource_name: self.resource_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "resource_name",
                    "resource_name was not specified but it is required when building UpdateSyncBlockerOutput",
                )
            })?,
            parent_resource_name: self.parent_resource_name,
            sync_blocker: self.sync_blocker,
            _request_id: self._request_id,
        })
    }
}