aws_sdk_scheduler/operation/get_schedule/
_get_schedule_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetScheduleInput {
6    /// <p>The name of the schedule to retrieve.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the schedule group associated with this schedule. If you omit this, EventBridge Scheduler assumes that the schedule is associated with the default group.</p>
9    pub group_name: ::std::option::Option<::std::string::String>,
10}
11impl GetScheduleInput {
12    /// <p>The name of the schedule to retrieve.</p>
13    pub fn name(&self) -> ::std::option::Option<&str> {
14        self.name.as_deref()
15    }
16    /// <p>The name of the schedule group associated with this schedule. If you omit this, EventBridge Scheduler assumes that the schedule is associated with the default group.</p>
17    pub fn group_name(&self) -> ::std::option::Option<&str> {
18        self.group_name.as_deref()
19    }
20}
21impl GetScheduleInput {
22    /// Creates a new builder-style object to manufacture [`GetScheduleInput`](crate::operation::get_schedule::GetScheduleInput).
23    pub fn builder() -> crate::operation::get_schedule::builders::GetScheduleInputBuilder {
24        crate::operation::get_schedule::builders::GetScheduleInputBuilder::default()
25    }
26}
27
28/// A builder for [`GetScheduleInput`](crate::operation::get_schedule::GetScheduleInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct GetScheduleInputBuilder {
32    pub(crate) name: ::std::option::Option<::std::string::String>,
33    pub(crate) group_name: ::std::option::Option<::std::string::String>,
34}
35impl GetScheduleInputBuilder {
36    /// <p>The name of the schedule to retrieve.</p>
37    /// This field is required.
38    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the schedule to retrieve.</p>
43    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.name = input;
45        self
46    }
47    /// <p>The name of the schedule to retrieve.</p>
48    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.name
50    }
51    /// <p>The name of the schedule group associated with this schedule. If you omit this, EventBridge Scheduler assumes that the schedule is associated with the default group.</p>
52    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.group_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the schedule group associated with this schedule. If you omit this, EventBridge Scheduler assumes that the schedule is associated with the default group.</p>
57    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.group_name = input;
59        self
60    }
61    /// <p>The name of the schedule group associated with this schedule. If you omit this, EventBridge Scheduler assumes that the schedule is associated with the default group.</p>
62    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.group_name
64    }
65    /// Consumes the builder and constructs a [`GetScheduleInput`](crate::operation::get_schedule::GetScheduleInput).
66    pub fn build(self) -> ::std::result::Result<crate::operation::get_schedule::GetScheduleInput, ::aws_smithy_types::error::operation::BuildError> {
67        ::std::result::Result::Ok(crate::operation::get_schedule::GetScheduleInput {
68            name: self.name,
69            group_name: self.group_name,
70        })
71    }
72}