aws-sdk-glue 1.149.0

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

/// <p>The details of a crawl in the workflow.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Crawl {
    /// <p>The state of the crawler.</p>
    pub state: ::std::option::Option<crate::types::CrawlState>,
    /// <p>The date and time on which the crawl started.</p>
    pub started_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time on which the crawl completed.</p>
    pub completed_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The error message associated with the crawl.</p>
    pub error_message: ::std::option::Option<::std::string::String>,
    /// <p>The log group associated with the crawl.</p>
    pub log_group: ::std::option::Option<::std::string::String>,
    /// <p>The log stream associated with the crawl.</p>
    pub log_stream: ::std::option::Option<::std::string::String>,
}
impl Crawl {
    /// <p>The state of the crawler.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::CrawlState> {
        self.state.as_ref()
    }
    /// <p>The date and time on which the crawl started.</p>
    pub fn started_on(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.started_on.as_ref()
    }
    /// <p>The date and time on which the crawl completed.</p>
    pub fn completed_on(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.completed_on.as_ref()
    }
    /// <p>The error message associated with the crawl.</p>
    pub fn error_message(&self) -> ::std::option::Option<&str> {
        self.error_message.as_deref()
    }
    /// <p>The log group associated with the crawl.</p>
    pub fn log_group(&self) -> ::std::option::Option<&str> {
        self.log_group.as_deref()
    }
    /// <p>The log stream associated with the crawl.</p>
    pub fn log_stream(&self) -> ::std::option::Option<&str> {
        self.log_stream.as_deref()
    }
}
impl Crawl {
    /// Creates a new builder-style object to manufacture [`Crawl`](crate::types::Crawl).
    pub fn builder() -> crate::types::builders::CrawlBuilder {
        crate::types::builders::CrawlBuilder::default()
    }
}

/// A builder for [`Crawl`](crate::types::Crawl).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CrawlBuilder {
    pub(crate) state: ::std::option::Option<crate::types::CrawlState>,
    pub(crate) started_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) completed_on: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) error_message: ::std::option::Option<::std::string::String>,
    pub(crate) log_group: ::std::option::Option<::std::string::String>,
    pub(crate) log_stream: ::std::option::Option<::std::string::String>,
}
impl CrawlBuilder {
    /// <p>The state of the crawler.</p>
    pub fn state(mut self, input: crate::types::CrawlState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the crawler.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::CrawlState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The state of the crawler.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::CrawlState> {
        &self.state
    }
    /// <p>The date and time on which the crawl started.</p>
    pub fn started_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.started_on = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time on which the crawl started.</p>
    pub fn set_started_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.started_on = input;
        self
    }
    /// <p>The date and time on which the crawl started.</p>
    pub fn get_started_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.started_on
    }
    /// <p>The date and time on which the crawl completed.</p>
    pub fn completed_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.completed_on = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time on which the crawl completed.</p>
    pub fn set_completed_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.completed_on = input;
        self
    }
    /// <p>The date and time on which the crawl completed.</p>
    pub fn get_completed_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.completed_on
    }
    /// <p>The error message associated with the crawl.</p>
    pub fn error_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.error_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The error message associated with the crawl.</p>
    pub fn set_error_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.error_message = input;
        self
    }
    /// <p>The error message associated with the crawl.</p>
    pub fn get_error_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.error_message
    }
    /// <p>The log group associated with the crawl.</p>
    pub fn log_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.log_group = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The log group associated with the crawl.</p>
    pub fn set_log_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.log_group = input;
        self
    }
    /// <p>The log group associated with the crawl.</p>
    pub fn get_log_group(&self) -> &::std::option::Option<::std::string::String> {
        &self.log_group
    }
    /// <p>The log stream associated with the crawl.</p>
    pub fn log_stream(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.log_stream = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The log stream associated with the crawl.</p>
    pub fn set_log_stream(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.log_stream = input;
        self
    }
    /// <p>The log stream associated with the crawl.</p>
    pub fn get_log_stream(&self) -> &::std::option::Option<::std::string::String> {
        &self.log_stream
    }
    /// Consumes the builder and constructs a [`Crawl`](crate::types::Crawl).
    pub fn build(self) -> crate::types::Crawl {
        crate::types::Crawl {
            state: self.state,
            started_on: self.started_on,
            completed_on: self.completed_on,
            error_message: self.error_message,
            log_group: self.log_group,
            log_stream: self.log_stream,
        }
    }
}