aws-sdk-qconnect 1.109.0

AWS SDK for Amazon Q Connect
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 PutFeedbackInput {
    /// <p>The identifier of the Amazon Q in Connect assistant.</p>
    pub assistant_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the feedback target.</p>
    pub target_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of the feedback target.</p>
    pub target_type: ::std::option::Option<crate::types::TargetType>,
    /// <p>Information about the feedback provided.</p>
    pub content_feedback: ::std::option::Option<crate::types::ContentFeedbackData>,
}
impl PutFeedbackInput {
    /// <p>The identifier of the Amazon Q in Connect assistant.</p>
    pub fn assistant_id(&self) -> ::std::option::Option<&str> {
        self.assistant_id.as_deref()
    }
    /// <p>The identifier of the feedback target.</p>
    pub fn target_id(&self) -> ::std::option::Option<&str> {
        self.target_id.as_deref()
    }
    /// <p>The type of the feedback target.</p>
    pub fn target_type(&self) -> ::std::option::Option<&crate::types::TargetType> {
        self.target_type.as_ref()
    }
    /// <p>Information about the feedback provided.</p>
    pub fn content_feedback(&self) -> ::std::option::Option<&crate::types::ContentFeedbackData> {
        self.content_feedback.as_ref()
    }
}
impl PutFeedbackInput {
    /// Creates a new builder-style object to manufacture [`PutFeedbackInput`](crate::operation::put_feedback::PutFeedbackInput).
    pub fn builder() -> crate::operation::put_feedback::builders::PutFeedbackInputBuilder {
        crate::operation::put_feedback::builders::PutFeedbackInputBuilder::default()
    }
}

/// A builder for [`PutFeedbackInput`](crate::operation::put_feedback::PutFeedbackInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutFeedbackInputBuilder {
    pub(crate) assistant_id: ::std::option::Option<::std::string::String>,
    pub(crate) target_id: ::std::option::Option<::std::string::String>,
    pub(crate) target_type: ::std::option::Option<crate::types::TargetType>,
    pub(crate) content_feedback: ::std::option::Option<crate::types::ContentFeedbackData>,
}
impl PutFeedbackInputBuilder {
    /// <p>The identifier of the Amazon Q in Connect assistant.</p>
    /// This field is required.
    pub fn assistant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.assistant_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon Q in Connect assistant.</p>
    pub fn set_assistant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.assistant_id = input;
        self
    }
    /// <p>The identifier of the Amazon Q in Connect assistant.</p>
    pub fn get_assistant_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.assistant_id
    }
    /// <p>The identifier of the feedback target.</p>
    /// This field is required.
    pub fn target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the feedback target.</p>
    pub fn set_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_id = input;
        self
    }
    /// <p>The identifier of the feedback target.</p>
    pub fn get_target_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_id
    }
    /// <p>The type of the feedback target.</p>
    /// This field is required.
    pub fn target_type(mut self, input: crate::types::TargetType) -> Self {
        self.target_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the feedback target.</p>
    pub fn set_target_type(mut self, input: ::std::option::Option<crate::types::TargetType>) -> Self {
        self.target_type = input;
        self
    }
    /// <p>The type of the feedback target.</p>
    pub fn get_target_type(&self) -> &::std::option::Option<crate::types::TargetType> {
        &self.target_type
    }
    /// <p>Information about the feedback provided.</p>
    /// This field is required.
    pub fn content_feedback(mut self, input: crate::types::ContentFeedbackData) -> Self {
        self.content_feedback = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the feedback provided.</p>
    pub fn set_content_feedback(mut self, input: ::std::option::Option<crate::types::ContentFeedbackData>) -> Self {
        self.content_feedback = input;
        self
    }
    /// <p>Information about the feedback provided.</p>
    pub fn get_content_feedback(&self) -> &::std::option::Option<crate::types::ContentFeedbackData> {
        &self.content_feedback
    }
    /// Consumes the builder and constructs a [`PutFeedbackInput`](crate::operation::put_feedback::PutFeedbackInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::put_feedback::PutFeedbackInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_feedback::PutFeedbackInput {
            assistant_id: self.assistant_id,
            target_id: self.target_id,
            target_type: self.target_type,
            content_feedback: self.content_feedback,
        })
    }
}