aws-sdk-datazone 1.136.0

AWS SDK for Amazon DataZone
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)]
pub struct PostLineageEventInput {
    /// <p>The ID of the domain where you want to post a data lineage event.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The data lineage event that you want to post. Only open-lineage run event are supported as events.</p>
    pub event: ::std::option::Option<::aws_smithy_types::Blob>,
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl PostLineageEventInput {
    /// <p>The ID of the domain where you want to post a data lineage event.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The data lineage event that you want to post. Only open-lineage run event are supported as events.</p>
    pub fn event(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.event.as_ref()
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl ::std::fmt::Debug for PostLineageEventInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PostLineageEventInput");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("event", &"*** Sensitive Data Redacted ***");
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}
impl PostLineageEventInput {
    /// Creates a new builder-style object to manufacture [`PostLineageEventInput`](crate::operation::post_lineage_event::PostLineageEventInput).
    pub fn builder() -> crate::operation::post_lineage_event::builders::PostLineageEventInputBuilder {
        crate::operation::post_lineage_event::builders::PostLineageEventInputBuilder::default()
    }
}

/// A builder for [`PostLineageEventInput`](crate::operation::post_lineage_event::PostLineageEventInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct PostLineageEventInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) event: ::std::option::Option<::aws_smithy_types::Blob>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl PostLineageEventInputBuilder {
    /// <p>The ID of the domain where you want to post a data lineage event.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the domain where you want to post a data lineage event.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The ID of the domain where you want to post a data lineage event.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The data lineage event that you want to post. Only open-lineage run event are supported as events.</p>
    /// This field is required.
    pub fn event(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.event = ::std::option::Option::Some(input);
        self
    }
    /// <p>The data lineage event that you want to post. Only open-lineage run event are supported as events.</p>
    pub fn set_event(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.event = input;
        self
    }
    /// <p>The data lineage event that you want to post. Only open-lineage run event are supported as events.</p>
    pub fn get_event(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.event
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`PostLineageEventInput`](crate::operation::post_lineage_event::PostLineageEventInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::post_lineage_event::PostLineageEventInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::post_lineage_event::PostLineageEventInput {
            domain_identifier: self.domain_identifier,
            event: self.event,
            client_token: self.client_token,
        })
    }
}
impl ::std::fmt::Debug for PostLineageEventInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PostLineageEventInputBuilder");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("event", &"*** Sensitive Data Redacted ***");
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}