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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateCrawlerScheduleInput {
    /// <p>The name of the crawler whose schedule to update.</p>
    pub crawler_name: ::std::option::Option<::std::string::String>,
    /// <p>The updated <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
    pub schedule: ::std::option::Option<::std::string::String>,
}
impl UpdateCrawlerScheduleInput {
    /// <p>The name of the crawler whose schedule to update.</p>
    pub fn crawler_name(&self) -> ::std::option::Option<&str> {
        self.crawler_name.as_deref()
    }
    /// <p>The updated <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
    pub fn schedule(&self) -> ::std::option::Option<&str> {
        self.schedule.as_deref()
    }
}
impl UpdateCrawlerScheduleInput {
    /// Creates a new builder-style object to manufacture [`UpdateCrawlerScheduleInput`](crate::operation::update_crawler_schedule::UpdateCrawlerScheduleInput).
    pub fn builder() -> crate::operation::update_crawler_schedule::builders::UpdateCrawlerScheduleInputBuilder {
        crate::operation::update_crawler_schedule::builders::UpdateCrawlerScheduleInputBuilder::default()
    }
}

/// A builder for [`UpdateCrawlerScheduleInput`](crate::operation::update_crawler_schedule::UpdateCrawlerScheduleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCrawlerScheduleInputBuilder {
    pub(crate) crawler_name: ::std::option::Option<::std::string::String>,
    pub(crate) schedule: ::std::option::Option<::std::string::String>,
}
impl UpdateCrawlerScheduleInputBuilder {
    /// <p>The name of the crawler whose schedule to update.</p>
    /// This field is required.
    pub fn crawler_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.crawler_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the crawler whose schedule to update.</p>
    pub fn set_crawler_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.crawler_name = input;
        self
    }
    /// <p>The name of the crawler whose schedule to update.</p>
    pub fn get_crawler_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.crawler_name
    }
    /// <p>The updated <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
    pub fn schedule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.schedule = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The updated <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
    pub fn set_schedule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.schedule = input;
        self
    }
    /// <p>The updated <code>cron</code> expression used to specify the schedule (see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html">Time-Based Schedules for Jobs and Crawlers</a>. For example, to run something every day at 12:15 UTC, you would specify: <code>cron(15 12 * * ? *)</code>.</p>
    pub fn get_schedule(&self) -> &::std::option::Option<::std::string::String> {
        &self.schedule
    }
    /// Consumes the builder and constructs a [`UpdateCrawlerScheduleInput`](crate::operation::update_crawler_schedule::UpdateCrawlerScheduleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_crawler_schedule::UpdateCrawlerScheduleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_crawler_schedule::UpdateCrawlerScheduleInput {
            crawler_name: self.crawler_name,
            schedule: self.schedule,
        })
    }
}